]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
no bug - Lowercase the email address before generating the MD5 for Gravatar
authorMatt N <github@matthew.noorenberghe.com>
Wed, 17 Jan 2018 01:10:29 +0000 (20:10 -0500)
committerKohei Yoshino <kohei.yoshino@gmail.com>
Wed, 17 Jan 2018 01:10:29 +0000 (20:10 -0500)
This is step 2 of https://en.gravatar.com/site/implement/hash/

extensions/Review/web/js/badge.js

index f5f8cc2366a6cec0a37d4856b1b34d4a1a703006..ea09ed1169d5f0fd435b8e662d1c41b3256c113e 100644 (file)
@@ -84,7 +84,7 @@ Bugzilla.Review.Badge = class Badge {
             $li.setAttribute('role', 'none');
             $li.innerHTML = `<a href="${link}" role="menuitem" tabindex="-1" `
                 + `class="${(req.restricted ? 'secure' : '')}" data-type="${req.type}">`
-                + `<img src="https://secure.gravatar.com/avatar/${md5(email)}?d=mm&amp;size=64" alt="">`
+                + `<img src="https://secure.gravatar.com/avatar/${md5(email.toLowerCase())}?d=mm&amp;size=64" alt="">`
                 + `<label><strong>${pretty_name.htmlEncode()}</strong> asked for your `
                 + (req.type === 'needinfo' ? 'info' : req.type) + (req.attach_id ? ' on ' : '')
                 + (req.attach_id && req.ispatch ? (req.dup_count > 1 ? `${req.dup_count} patches` : 'a patch') : '')