fix: strengthen password security - increase bcrypt rounds to 14, add notNull constraint to password field, add pull_policy to docker-compose

This commit is contained in:
Rasmus Q
2026-03-15 20:33:12 +00:00
parent 988c7ef6b5
commit 83d68b0c58
3 changed files with 3 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ services:
image: postgres:16-alpine
container_name: wishlist-postgres
restart: unless-stopped
pull_policy: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}

View File

@@ -11,7 +11,7 @@ export const users = pgTable('user', {
email: text('email').unique(),
emailVerified: timestamp('emailVerified', { mode: 'date' }),
image: text('image'),
password: text('password'),
password: text('password').notNull(),
username: text('username').unique(),
dashboardTheme: text('dashboard_theme').default('none'),
dashboardColor: text('dashboard_color'),

View File

@@ -62,7 +62,7 @@ export const actions: Actions = {
return fail(400, { error: 'Username already taken', name, username });
}
const hashedPassword = await bcrypt.hash(password, 10);
const hashedPassword = await bcrypt.hash(password, 14);
await db.insert(users).values({
name: sanitizedName,