remove password check

This commit is contained in:
lucaslng 2025-02-26 19:56:53 -05:00
parent d451e06e84
commit 9bfb63a5d0
2 changed files with 0 additions and 9 deletions
backend/socket-handlers
package.json

View file

@ -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);

View file

@ -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",