This commit is contained in:
Girish Ramakrishnan
2020-02-01 18:12:33 -08:00
parent a84cdc3d09
commit 57e3180737

View File

@@ -686,7 +686,7 @@ function addAppPassword(userId, identifier, name, callback) {
let error = validateAppPasswordName(name);
if (error) return callback(error);
if (identifier.length < 1) return new BoxError(BoxError.BAD_FIELD, 'identifier must be atleast 1 char');
if (identifier.length < 1) return callback(new BoxError(BoxError.BAD_FIELD, 'identifier must be atleast 1 char'));
const password = hat(8 * 4);
const hashedPassword = crypto.createHash('sha256').update(password).digest('base64');