Commit 6778aab7 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes #943 Fixing hash check

parent 3748677d
...@@ -885,9 +885,7 @@ sub argonaut_gen_ssha_token { ...@@ -885,9 +885,7 @@ sub argonaut_gen_ssha_token {
sub argonaut_check_ssha_token { sub argonaut_check_ssha_token {
my ($hash, $token) = @_; my ($hash, $token) = @_;
$hash = decode_base64(substr($hash, 6)); my $salt = substr(decode_base64(substr($hash, 6)), 20);
my $salt = substr($hash, 20);
$hash = substr($hash, 0, 20);
if ($hash eq argonaut_gen_ssha_token($token, $salt)) { if ($hash eq argonaut_gen_ssha_token($token, $salt)) {
return 1; return 1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment