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

1590
backend/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,7 @@
"license": "ISC",
"dependencies": {
"amqplib": "^0.10.4",
"bcrypt": "^5.1.1",
"bcryptjs": "^2.4.3",
"connect-redis": "^7.1.1",
"cors": "^2.8.5",
"date-fns": "^4.1.0",
@@ -26,9 +26,9 @@
"i18n": "^0.15.1",
"joi": "^17.13.3",
"jsdom": "^26.1.0",
"multer": "^1.4.5-lts.1",
"multer": "^2.0.0",
"mysql2": "^3.10.3",
"nodemailer": "^6.9.14",
"nodemailer": "^7.0.11",
"pg": "^8.12.0",
"pg-hstore": "^2.3.4",
"redis": "^4.7.0",

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