From bc90a53ff8d8819297cc01098dda3e76f3e34601 Mon Sep 17 00:00:00 2001 From: Jason Dreyzehner Date: Tue, 18 Oct 2016 18:26:02 -0400 Subject: [PATCH] fix(gravatar): convert email to lower case before hashing for gravatar Fixes #529 --- src/js/directives/gravatar.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/directives/gravatar.js b/src/js/directives/gravatar.js index 2d28168d4..c76817b5e 100644 --- a/src/js/directives/gravatar.js +++ b/src/js/directives/gravatar.js @@ -12,9 +12,10 @@ angular.module('copayApp.directives') email: '@' }, link: function(scope, el, attr) { - scope.emailHash = md5.createHash(scope.email || ''); + if(typeof scope.email === "string"){ + scope.emailHash = md5.createHash(scope.email.toLowerCase() || ''); + } }, template: '{{ name }}' } }); -