##// END OF EJS Templates
Use Digest::SHA instead of Digest::SHA1 in Redmine.pm (#10242)....
Jean-Philippe Lang -
r8762:6a290cc281e6
parent child
Show More
@@ -99,7 +99,7 use strict;
99 99 use warnings FATAL => 'all', NONFATAL => 'redefine';
100 100
101 101 use DBI;
102 use Digest::SHA1;
102 use Digest::SHA;
103 103 # optional module for LDAP authentication
104 104 my $CanUseLDAPAuth = eval("use Authen::Simple::LDAP; 1");
105 105
@@ -327,7 +327,7 sub is_member {
327 327 my $dbh = connect_database($r);
328 328 my $project_id = get_project_identifier($r);
329 329
330 my $pass_digest = Digest::SHA1::sha1_hex($redmine_pass);
330 my $pass_digest = Digest::SHA::sha1_hex($redmine_pass);
331 331
332 332 my $access_mode = defined $read_only_methods{$r->method} ? "R" : "W";
333 333
@@ -346,7 +346,7 sub is_member {
346 346
347 347 unless ($auth_source_id) {
348 348 my $method = $r->method;
349 my $salted_password = Digest::SHA1::sha1_hex($salt.$pass_digest);
349 my $salted_password = Digest::SHA::sha1_hex($salt.$pass_digest);
350 350 if ($hashed_password eq $salted_password && (($access_mode eq "R" && $permissions =~ /:browse_repository/) || $permissions =~ /:commit_access/) ) {
351 351 $ret = 1;
352 352 last;
General Comments 0
You need to be logged in to leave comments. Login now