mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 07:15:36 +00:00
fix(database): cannot read properties of null (reading 'substring')
This commit is contained in:
parent
aae11b6e1f
commit
55e6460b0e
@ -20,6 +20,8 @@ export class PasswordField extends Field {
|
||||
}
|
||||
|
||||
async verify(password: string, hash: string) {
|
||||
password = password || '';
|
||||
hash = hash || '';
|
||||
const { length = 64, randomBytesSize = 8 } = this.options;
|
||||
return new Promise((resolve, reject) => {
|
||||
const salt = hash.substring(0, randomBytesSize * 2);
|
||||
|
Loading…
Reference in New Issue
Block a user