mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-12 19:49:59 +05:00
fix(password): fix TypeError on password change with user registry enabled
This commit is contained in:
parent
35626d9681
commit
00d830b7f0
@ -14,6 +14,7 @@ const Moderator = module.exports;
|
||||
*/
|
||||
|
||||
const pathFromId = function (Env, id) {
|
||||
id = Util.escapeKeyCharacters(id || '');
|
||||
if (!Basic.isValidId(id)) {
|
||||
return void console.error('MODERATOR_BAD_ID', id);
|
||||
}
|
||||
|
||||
@ -14,6 +14,8 @@ const User = module.exports;
|
||||
*/
|
||||
|
||||
const pathFromId = function (Env, id) {
|
||||
if (!id || typeof(id) !== 'string') { return; }
|
||||
id = Util.escapeKeyCharacters(id);
|
||||
if (!Basic.isValidId(id)) {
|
||||
return void console.error('USER_BAD_ID', id);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user