Update dependencies and refactor authentication logic

- Replaced `bcrypt` with `bcryptjs` for compatibility in `authService.js` and `settingsService.js`.
- Updated package versions in `package.json` and `package-lock.json`, including `multer`, `nodemailer`, and others.
- Added storage management features in the frontend, including free storage calculation and localization updates for new terms in `falukant.json` files.
This commit is contained in:
Torsten Schulz (local)
2025-11-26 18:14:36 +01:00
parent 608e62c2bd
commit c3ea7eecc2
8 changed files with 633 additions and 998 deletions

View File

@@ -1,4 +1,4 @@
import bcrypt from 'bcrypt';
import bcrypt from 'bcryptjs';
import crypto from 'crypto';
import { v4 as uuidv4 } from 'uuid';
import User from '../models/community/user.js';

View File

@@ -328,7 +328,7 @@ class SettingsService extends BaseService{
}
// Verify old password
const bcrypt = await import('bcrypt');
const bcrypt = await import('bcryptjs');
const match = await bcrypt.compare(settings.oldpassword, user.password);
if (!match) {
throw new Error('Old password is incorrect');