mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-08 09:28:12 +08:00
Autofix on save
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const passwordHashOld = require('password-hash');
|
||||
const bcrypt = require('bcrypt');
|
||||
const passwordHashOld = require("password-hash");
|
||||
const bcrypt = require("bcrypt");
|
||||
const saltRounds = 10;
|
||||
|
||||
exports.generate = function (password) {
|
||||
@@ -9,9 +9,9 @@ exports.generate = function (password) {
|
||||
exports.verify = function (password, hash) {
|
||||
if (isSHA1(hash)) {
|
||||
return passwordHashOld.verify(password, hash)
|
||||
} else {
|
||||
return bcrypt.compareSync(password, hash);
|
||||
}
|
||||
|
||||
return bcrypt.compareSync(password, hash);
|
||||
}
|
||||
|
||||
function isSHA1(hash) {
|
||||
|
Reference in New Issue
Block a user