From d3f82b93fa9b194226a730201e6086bbfba41e7d Mon Sep 17 00:00:00 2001 From: Leon Serfaty G Date: Thu, 17 Jul 2025 11:26:42 +0000 Subject: [PATCH] update failed, not authenticated, when trying to change passwords --- src/lib/actions/user.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/actions/user.ts b/src/lib/actions/user.ts index 71d11e0..f1ce3f9 100644 --- a/src/lib/actions/user.ts +++ b/src/lib/actions/user.ts @@ -43,7 +43,7 @@ export async function updateUser( const { name, email, password } = validated.data; try { - if (password) { + if (password && password.length > 0) { // In a real application, hash the password const stmt = db.prepare( 'UPDATE users SET name = ?, email = ?, password = ? WHERE id = ?'