Skip to content

Commit 12bcd70

Browse files
authored
Merge pull request #1485 from metacpan/haarg/encode-contrib
encode contributor data before digesting
2 parents 316e9cb + 754193f commit 12bcd70

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

lib/MetaCPAN/Script/Role/Contributor.pm

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use Moose::Role;
55
use Log::Contextual qw( :log :dlog );
66
use MetaCPAN::ESConfig qw( es_doc_path );
77
use MetaCPAN::Util qw( true false digest );
8+
use Unicode::UTF8 qw( encode_utf8 );
89
use Ref::Util ();
910

1011
sub update_contributors {
@@ -88,9 +89,12 @@ sub release_contributor_update_actions {
8889

8990
for my $contrib (@$contribs) {
9091
my $id = digest(
91-
$release->{name}, $release->{author},
92-
$contrib->{pauseid}, $contrib->{name},
93-
@{ $contrib->{email} },
92+
map encode_utf8( $_ // '' ),
93+
(
94+
$release->{name}, $release->{author},
95+
$contrib->{pauseid}, $contrib->{name},
96+
@{ $contrib->{email} },
97+
)
9498
);
9599

96100
my $doc = {

0 commit comments

Comments
 (0)