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

Gravatar integration should use lower case email addresses

    XMLWordPrintable

Details

    Description

      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;
      

      Attachments

        Issue Links

          Activity

            People

              edalgliesh Eric Dalgliesh
              4a62c8084de4 Onur C Cakmak
              Votes:
              5 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: