Permalink
Browse files

Use sha256 for OpenID avatars through Libravatar

This guarantees that no attempt to contact Gravatar will be made.
  • Loading branch information...
fmarier committed Mar 27, 2011
1 parent a90f1a7 commit dc0b2a8b5f4b03fdcc510b4104263d391cae231a
Showing with 4 additions and 2 deletions.
  1. +1 −0 Build.PL
  2. +1 −0 META.yml
  3. +2 −2 lib/Libravatar/URL.pm
View
1 Build.PL 100644 → 100755
@@ -33,6 +33,7 @@ my $builder = Module::Build->new(
'Net::DNS::Resolver' => 0,
'URI::Escape' => 0,
'Digest::MD5' => 0,
+ 'Digest::SHA' => 0,
'Carp' => 0,
perl => '5.6.0',
'parent' => 0,
View
@@ -14,6 +14,7 @@ build_requires:
requires:
Carp: 0
Digest::MD5: 0
+ Digest::SHA: 0
Net::DNS::Resolver: 0
URI::Escape: 0
parent: 0
View
@@ -4,7 +4,7 @@ use strict;
use warnings;
use Gravatar::URL qw(gravatar_url);
-use Digest::MD5 qw(md5_hex);
+use Digest::SHA qw(sha256_hex);
use Carp;
our $VERSION = '1.04';
@@ -255,7 +255,7 @@ sub libravatar_url {
}
if ( exists $args{openid} ) {
- $args{id} = md5_hex(lowercase_openid($args{openid}));
+ $args{id} = sha256_hex(lowercase_openid($args{openid}));
undef $args{openid};
}
return gravatar_url(%args);

0 comments on commit dc0b2a8

Please sign in to comment.