Skip to content

Commit

Permalink
#369 When fetching commit author avatars from Gravatar, fetch email a…
Browse files Browse the repository at this point in the history
…ddresses case-insensitive.
  • Loading branch information
mhutchie committed Aug 26, 2020
1 parent c3646ee commit ade2f6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/avatarManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ export class AvatarManager extends Disposable {
*/
private async fetchFromGravatar(avatarRequest: AvatarRequestItem) {
this.logger.log('Requesting Avatar for ' + maskEmail(avatarRequest.email) + ' from Gravatar');
let hash: string = crypto.createHash('md5').update(avatarRequest.email).digest('hex');
const hash: string = crypto.createHash('md5').update(avatarRequest.email.trim().toLowerCase()).digest('hex');

let img = await this.downloadAvatarImage(avatarRequest.email, 'https://secure.gravatar.com/avatar/' + hash + '?s=162&d=404'), identicon = false;
if (img === null) {
Expand Down

0 comments on commit ade2f6e

Please sign in to comment.