Merge branch 'master' into master

This commit is contained in:
Clément Michaud 2019-01-08 21:32:28 +01:00 committed by GitHub
commit 84b1194711
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,7 @@ export class FileUsersDatabase implements IUsersDatabase {
password: string)
: Bluebird<void> {
const storedHash: string = database.users[username].password;
const matches = storedHash.match(/rounds=([0-9]+)\$([a-zA-z0-9]+)\$/);
const matches = storedHash.match(/rounds=([0-9]+)\$([a-zA-z0-9./]+)\$/);
if (!(matches && matches.length == 3)) {
return Bluebird.reject(new Error("Unable to detect the hash salt and rounds. " +
"Make sure the password is hashed with SSHA512."));