diff --git a/backend/socket-handlers/main-socket-handler.ts b/backend/socket-handlers/main-socket-handler.ts index 5d31878..87ca770 100644 --- a/backend/socket-handlers/main-socket-handler.ts +++ b/backend/socket-handlers/main-socket-handler.ts @@ -15,7 +15,6 @@ import { JWTDecoded, ValidationError } from "../util-server"; -import { passwordStrength } from "check-password-strength"; import jwt from "jsonwebtoken"; import { Settings } from "../settings"; @@ -29,9 +28,6 @@ export class MainSocketHandler extends SocketHandler { // Setup socket.on("setup", async (username, password, callback) => { try { - if (passwordStrength(password).value === "Too weak") { - throw new Error("Password is too weak. It should contain alphabetic and numeric characters. It must be at least 6 characters in length."); - } if ((await R.knex("user").count("id as count").first()).count !== 0) { throw new Error("Dockge has been initialized. If you want to run setup again, please delete the database."); @@ -213,10 +209,6 @@ export class MainSocketHandler extends SocketHandler { throw new Error("Invalid new password"); } - if (passwordStrength(password.newPassword).value === "Too weak") { - throw new Error("Password is too weak. It should contain alphabetic and numeric characters. It must be at least 6 characters in length."); - } - let user = await doubleCheckPassword(socket, password.currentPassword); await user.resetPassword(password.newPassword); diff --git a/package.json b/package.json index 9df1183..f79b3a1 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ "@inventage/envsubst": "^0.16.0", "@louislam/sqlite3": "~15.1.6", "bcryptjs": "~2.4.3", - "check-password-strength": "~2.0.10", "command-exists": "~1.2.9", "compare-versions": "~6.1.1", "composerize": "~1.4.1",