diff --git a/package-lock.json b/package-lock.json index cd3c9b8..7f0d7c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "auth-server", - "version": "1.7.2", + "version": "1.7.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "auth-server", - "version": "1.7.2", + "version": "1.7.4", "license": "ISC", "dependencies": { "bcryptjs": "^2.4.3", diff --git a/package.json b/package.json index 6a27842..ea8d128 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "auth-server", - "version": "1.7.3", + "version": "1.7.4", "description": "An API centric auth server. Uses Sequelize and mariaDB by default.", "main": "server/server.js", "scripts": { diff --git a/server/auth/signup.js b/server/auth/signup.js index 56b95ce..a873a64 100644 --- a/server/auth/signup.js +++ b/server/auth/signup.js @@ -83,6 +83,10 @@ const validateDetails = async (body) => { return 'Missing password'; } + if (typeof body.password != "string") { + return 'Invalid password'; + } + if (body.password.length < 8) { return 'Password too short'; }