question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: How to reverse transformations

See original GitHub issue

If I say add:

transforms:
  email: "md5" # The email field will be MD5-hashed

How do I retrieve the actual email?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
pingu8007commented, Jul 10, 2020

I’m not sure why Staticman bothers with 3., since there’s not really anything I can do with the hashed email address.

If you use Gravatar you can show visitor’s avatar with those hashed email. Gravatar use md5-hashed email as identifier.

0reactions
willymcallistercommented, Jul 7, 2020

I have the same question. MD5 hashing is specified in staticman.yml. The Staticman instance (mine is at Heroku) uses MD5 for two things.

  1. Staticman receives the comment_form and concatenates three fields, separated by hyphens: username-repository (options[parent])-entryID (article URL). The result is hashed to produce a 32 text character name for the mailing list for that post. That name is sent to Mailgun with a request to create the mailing list.
  2. The subscriber’s email is sent to Staticman instance as cleartext, included in the comment_form submission. Staticman sends the cleartext email address to Mailgun to become an entry in a mailing list in my secure account at MailGun.
  3. Staticman does an MD5 hash of the email address and returns the result as part of the PR. It gets saved in _data/comments/post-name/comment-file.yml in my publicly-accessible repository at GitHub.

I’m not sure why Staticman bothers with 3., since there’s not really anything I can do with the hashed email address. It was perhaps envisioned as a future flexibility when first implemented. One thing you might do is answer the question, “Has this person ever emailed me before?” If you MD5 hash a newly arrived email address and its hash matches one you already have in your repository, then the answer is “yes”.

My notes on Staticman at Heroku: https://spinningnumbers.org/a/staticman-heroku.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reverse graph transformation - H2 Maths Tuition
This question was posted by a student. " What is the series of transformation from f(3-x/2) to f(x)?" Here are 3 different methods...
Read more >
Given points on transformed function find the ... - YouTube
Given points on transformed function find the original points Reverse Calculations.
Read more >
How can I reverse the effect of a transformation matrix?
A more general way of asking the question might be: if I have a matrix M that takes coordinates from space A to...
Read more >
SOLVED: Reversing the Order of Transformations Reverse the order ...
What happens if we reverse or change the order of the transformation? ... We don't have your requested question, but here is a...
Read more >
Reversing graph transformations
Keywords: graph transformation, reversibility, transaction ... q can do a transition to state q then it can do the same transition to any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found