zzzsochi/Flask-Gravatar

change default `FORCE_LOWER` to `true`

Opened this issue · 0 comments

The developer documentation from gravatar.com states:

To ensure a consistent and accurate hash, the following steps should be taken to create a hash:

  1. Trim leading and trailing whitespace from an email address
  2. Force all characters to lower-case
  3. hash the final string with SHA256

Current implementation has a default value for FORCE_LOWER of False. This results in a wrong hash value for emails which start or are complete in upper case. I think the default should follow gravatar.com recommendations and force all characters of an email address to lower-case.