Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-28913

Gravatar integration should use lower case email addresses

      Gravatar implementation in com.atlassian.jira.avatar.AvatarServiceImpl.GravatarUrlStrategy doesn't convert email address to lower case.

      According to http://en.gravatar.com/site/implement/hash/ it should have been lowercased.

      Haven't tested it but this patch should fix it.

      --- AvatarServiceImpl.java      Thu Jul  5 03:30:04 2012
      +++ AvatarServiceImpl2.java     Wed Jul 11 18:42:44 2012
      @@ -370,7 +370,7 @@
                   if (user != null && user.getEmailAddress() != null)
                   {
                       String email = user.getEmailAddress();
      -                String hash = MD5Util.md5Hex(email);
      +                String hash = MD5Util.md5Hex(email.toLowerCase());
      
                       URI jiraBaseUrl = URI.create(velocityRequestContextFactory.getJiraVelocityRequestContext().getCanonicalBaseUrl());
                       String gravatarBaseUrl;
      

          Form Name

            [JRASERVER-28913] Gravatar integration should use lower case email addresses

            Saxon Mailey added a comment - - edited

            Hi All,

            I am seeing this issue 8.16.1 - the strange thing is I am sure this was working ok before the upgrade from V7.

            Our company standard is Firstname.Lastname@company.com and we are not able to update the directory...  so we need the email to be set to lowercase when sending hash to gravatar

             

            EDIT - did some more testing and the gravatars work as expected with local users, however when directory users have mixed case email gravatar does not work...  I can put exactly the same email address on a local user and the gravatar works..

             

            Saxon Mailey added a comment - - edited Hi All, I am seeing this issue 8.16.1 - the strange thing is I am sure this was working ok before the upgrade from V7. Our company standard is Firstname.Lastname@company.com and we are not able to update the directory...  so we need the email to be set to lowercase when sending hash to gravatar   EDIT - did some more testing and the gravatars work as expected with local users, however when directory users have mixed case email gravatar does not work...  I can put exactly the same email address on a local user and the gravatar works..  

            I agree with Mark. This is incredibly easy to do and would fix an annoying problem.

            James Avill added a comment - I agree with Mark. This is incredibly easy to do and would fix an annoying problem.

            segfault added a comment -

            This bug has been tracked for a while and the fix seems trivial. Is there any chance of this getting done in a minor release?

            segfault added a comment - This bug has been tracked for a while and the fix seems trivial. Is there any chance of this getting done in a minor release?

            Haven't tried the patch, but we are experiencing the same problem. Mixed-case email addresses are not having their Gravatars fetched.

            Looking forward to this being fixed in 5.1.1

            Graham Bakay added a comment - Haven't tried the patch, but we are experiencing the same problem. Mixed-case email addresses are not having their Gravatars fetched. Looking forward to this being fixed in 5.1.1

              edalgliesh Eric Dalgliesh
              4a62c8084de4 Onur C Cakmak
              Affected customers:
              5 This affects my team
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: