diff options
author | Yorhel <git@yorhel.nl> | 2019-05-16 09:28:05 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-05-16 09:28:07 +0200 |
commit | 28aee117368048cdf56879bf35243498abbe8b4f (patch) | |
tree | 9c14f7331a3836f86677980a81ffb9727eabfb94 /lib | |
parent | 1cbc5107f32ec744d1834569f3885146d7282974 (diff) |
Actually make Unicode passwords work
Interestingly, Multi::API already did this correctly.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VNDB/Util/Auth.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/Util/Auth.pm b/lib/VNDB/Util/Auth.pm index bda13158..0093bf2d 100644 --- a/lib/VNDB/Util/Auth.pm +++ b/lib/VNDB/Util/Auth.pm @@ -72,7 +72,7 @@ sub _preparepass { my($self, $pass, $salt, $N, $r, $p) = @_; ($N, $r, $p) = @{$self->{scrypt_args}} if !$N; $salt ||= urandom(8); - return pack 'NCCa8a*', $N, $r, $p, $salt, scrypt_raw($pass, $self->{scrypt_salt} . $salt, $N, $r, $p, 32); + return pack 'NCCa8a*', $N, $r, $p, $salt, scrypt_raw(encode_utf8($pass), $self->{scrypt_salt} . $salt, $N, $r, $p, 32); } |