Skip to content

Commit 71d98fc

Browse files
committed
fix code generation in oauth2 controller
tr takes a character class. Trying to give it a class wrapped in brackets will try to convert the bracket characters. We're just generating a random ID, so it's ok for the format being generated to change.
1 parent e99a859 commit 71d98fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/MetaCPAN/Server/Controller/OAuth2.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ sub bad_request {
109109

110110
sub _build_code {
111111
my $digest = Digest::SHA::sha1_base64( rand() . $$ . {} . time );
112-
$digest =~ tr/[+\/]/-_/;
112+
$digest =~ tr{+/}{-_};
113113
return $digest;
114114
}
115115

0 commit comments

Comments
 (0)