summaryrefslogtreecommitdiffstats
path: root/extensions/Review/web
diff options
context:
space:
mode:
authorMatt N <github@matthew.noorenberghe.com>2018-01-17 02:10:29 +0100
committerKohei Yoshino <kohei.yoshino@gmail.com>2018-01-17 02:10:29 +0100
commitff57c3e5636e9e148d59dd2fc99499f22492c3de (patch)
tree510613fa84c4ac5194f00be64034e74c01605f3b /extensions/Review/web
parent116b74a0027b61c61142ef2aed73651af5db3d1d (diff)
downloadbugzilla-ff57c3e5636e9e148d59dd2fc99499f22492c3de.tar.gz
bugzilla-ff57c3e5636e9e148d59dd2fc99499f22492c3de.tar.xz
no bug - Lowercase the email address before generating the MD5 for Gravatar
This is step 2 of https://en.gravatar.com/site/implement/hash/
Diffstat (limited to 'extensions/Review/web')
-rw-r--r--extensions/Review/web/js/badge.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/Review/web/js/badge.js b/extensions/Review/web/js/badge.js
index f5f8cc236..ea09ed116 100644
--- a/extensions/Review/web/js/badge.js
+++ b/extensions/Review/web/js/badge.js
@@ -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') : '')