Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gravatar not working (bad hash value) for an email address with upper chars #7175

Closed
oldboys92 opened this issue Feb 1, 2024 · 0 comments
Closed

Comments

@oldboys92
Copy link
Contributor

Describe the bug

Gravatars for users with an email address which contains upper characters are not loaded correctly. The problem is the hash values is wrongly calculated by FLASK_GRAVATAR module see bug. The initialization of the Gravatar module is not following the best practice recommended by gravatar.com service itself.

To Reproduce

Steps to reproduce the behavior:

  1. create an account in pgadmin and use an email address which contains upper characters
  2. add such an email to your profile at gravatar.com
  3. this gets there saved as lower case
  4. you get a random generated gravatar but not what you have setup

Expected behavior

The gravatar hash code should be calculated based on service provider recommendation (email always trimmed and lower case).

Error message

There is no error, but the calculated hash value is wrong and so a random generated image is loaded, even there is a personal one associated with the email of the logged in user.

Additional context

This might get solved by the upstream project (flask-gravatar) but the devs of the module seem not quite active lately. Since the parameter is already available, but has a wrong default value, this bug could be also fixed by pgadmin by correctly initializing the Gravatar function with a FORCE_LOWER value of True.

@oldboys92 oldboys92 added the Bug label Feb 1, 2024
oldboys92 added a commit to oldboys92/pgadmin4 that referenced this issue Feb 1, 2024
Fix wrong default for FORCE_LOWER in the FLASK_GRAVATAR module pgadmin-org#7175
@akshay-joshi akshay-joshi added this to the 8.3 milestone Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants