Skip to content

Conversation

@tomushkin
Copy link

The minified String.prototype.md5() implementation is missing a couple of backslashes in replace(s/rn//g, "n") causing contacts that contain "rn" to not have the gravatar displayed.

Also it's doing toLowerCase() on its input, which doesn't seem correct.

This was causing some gravatars to not display properly
@WoodySlum
Copy link
Member

Hi !

Thank you for your contribution
I would prefer to do email.toLowerCase().md5().toLowerCase() instead of, modifying common.js. I didn't see any other use of md5 string prototype, but it may be the case in the future.

@tomushkin
Copy link
Author

Hello, the inner md5 function already does toLowerCase() on the hash. The public function does it on the input which must be a mistake:

  var md5 = function(s){...; return i.toLowerCase();};
  return md5(this.toLowerCase());

I moved the second call from this to email, which effectively is what you are suggesting?

@WoodySlum WoodySlum self-requested a review June 4, 2024 09:16
@WoodySlum WoodySlum self-assigned this Jun 4, 2024
@WoodySlum WoodySlum force-pushed the master branch 2 times, most recently from e4c98fd to 2258d5c Compare November 25, 2024 11:01
@dgeo
Copy link

dgeo commented Apr 9, 2025

seems correct, replacing \r\n with \n seems better than replacing "rn" with "n" ;)

@WoodySlum WoodySlum removed their request for review April 15, 2025 14:43
@WoodySlum WoodySlum removed their assignment Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants