Skip to content

Commit 879b5a7

Browse files
committed
fix: replace bcrypt with bcryptjs for improved compatibility and security
chore: update package dependencies to latest versions and address vulnerabilities refactor: update userRouters to use bcryptjs instead of bcrypt
1 parent 303e0d2 commit 879b5a7

5 files changed

Lines changed: 335 additions & 150 deletions

File tree

models/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const bcrypt = require("bcrypt");
1+
const bcrypt = require("bcryptjs");
22
const { setUser } = require("../services/aouth");
33
const db = require("../config/db"); // Your MySQL db connection wrapper
44
const { logActivity } = require("../utils/activityLogger");

npm-audit.json

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
{
2+
"auditReportVersion": 2,
3+
"vulnerabilities": {
4+
"brace-expansion": {
5+
"name": "brace-expansion",
6+
"severity": "moderate",
7+
"isDirect": false,
8+
"via": [
9+
{
10+
"source": 1120311,
11+
"name": "brace-expansion",
12+
"dependency": "brace-expansion",
13+
"title": "brace-expansion: Large numeric range defeats documented `max` DoS protection",
14+
"url": "https://github.com/advisories/GHSA-jxxr-4gwj-5jf2",
15+
"severity": "moderate",
16+
"cwe": [
17+
"CWE-400"
18+
],
19+
"cvss": {
20+
"score": 6.5,
21+
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
22+
},
23+
"range": ">=5.0.0 <5.0.6"
24+
}
25+
],
26+
"effects": [],
27+
"range": "5.0.2 - 5.0.5",
28+
"nodes": [
29+
"node_modules/brace-expansion"
30+
],
31+
"fixAvailable": true
32+
},
33+
"express-rate-limit": {
34+
"name": "express-rate-limit",
35+
"severity": "moderate",
36+
"isDirect": true,
37+
"via": [
38+
"ip-address"
39+
],
40+
"effects": [],
41+
"range": "8.0.1 - 8.5.0",
42+
"nodes": [
43+
"node_modules/express-rate-limit"
44+
],
45+
"fixAvailable": true
46+
},
47+
"ip-address": {
48+
"name": "ip-address",
49+
"severity": "moderate",
50+
"isDirect": false,
51+
"via": [
52+
{
53+
"source": 1118827,
54+
"name": "ip-address",
55+
"dependency": "ip-address",
56+
"title": "ip-address has XSS in Address6 HTML-emitting methods",
57+
"url": "https://github.com/advisories/GHSA-v2v4-37r5-5v8g",
58+
"severity": "moderate",
59+
"cwe": [
60+
"CWE-79"
61+
],
62+
"cvss": {
63+
"score": 0,
64+
"vectorString": null
65+
},
66+
"range": "<=10.1.0"
67+
}
68+
],
69+
"effects": [
70+
"express-rate-limit"
71+
],
72+
"range": "<=10.1.0",
73+
"nodes": [
74+
"node_modules/ip-address"
75+
],
76+
"fixAvailable": true
77+
},
78+
"postcss": {
79+
"name": "postcss",
80+
"severity": "moderate",
81+
"isDirect": false,
82+
"via": [
83+
{
84+
"source": 1117015,
85+
"name": "postcss",
86+
"dependency": "postcss",
87+
"title": "PostCSS has XSS via Unescaped </style> in its CSS Stringify Output",
88+
"url": "https://github.com/advisories/GHSA-qx2v-qp2m-jg93",
89+
"severity": "moderate",
90+
"cwe": [
91+
"CWE-79"
92+
],
93+
"cvss": {
94+
"score": 6.1,
95+
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
96+
},
97+
"range": "<8.5.10"
98+
}
99+
],
100+
"effects": [],
101+
"range": "<8.5.10",
102+
"nodes": [
103+
"node_modules/postcss"
104+
],
105+
"fixAvailable": true
106+
},
107+
"qs": {
108+
"name": "qs",
109+
"severity": "moderate",
110+
"isDirect": false,
111+
"via": [
112+
{
113+
"source": 1119502,
114+
"name": "qs",
115+
"dependency": "qs",
116+
"title": "qs has a remotely triggerable DoS: qs.stringify crashes with TypeError on null/undefined entries in comma-format arrays when encodeValuesOnly is set",
117+
"url": "https://github.com/advisories/GHSA-q8mj-m7cp-5q26",
118+
"severity": "moderate",
119+
"cwe": [
120+
"CWE-476"
121+
],
122+
"cvss": {
123+
"score": 5.3,
124+
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
125+
},
126+
"range": ">=6.11.1 <=6.15.1"
127+
}
128+
],
129+
"effects": [],
130+
"range": "6.11.1 - 6.15.1",
131+
"nodes": [
132+
"node_modules/qs"
133+
],
134+
"fixAvailable": true
135+
},
136+
"uuid": {
137+
"name": "uuid",
138+
"severity": "moderate",
139+
"isDirect": true,
140+
"via": [
141+
{
142+
"source": 1119442,
143+
"name": "uuid",
144+
"dependency": "uuid",
145+
"title": "uuid: Missing buffer bounds check in v3/v5/v6 when buf is provided",
146+
"url": "https://github.com/advisories/GHSA-w5hq-g745-h8pq",
147+
"severity": "moderate",
148+
"cwe": [
149+
"CWE-787",
150+
"CWE-1285"
151+
],
152+
"cvss": {
153+
"score": 7.5,
154+
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
155+
},
156+
"range": ">=13.0.0 <13.0.1"
157+
}
158+
],
159+
"effects": [],
160+
"range": "13.0.0",
161+
"nodes": [
162+
"node_modules/uuid"
163+
],
164+
"fixAvailable": true
165+
}
166+
},
167+
"metadata": {
168+
"vulnerabilities": {
169+
"info": 0,
170+
"low": 0,
171+
"moderate": 6,
172+
"high": 0,
173+
"critical": 0,
174+
"total": 6
175+
},
176+
"dependencies": {
177+
"prod": 203,
178+
"dev": 29,
179+
"optional": 30,
180+
"peer": 2,
181+
"peerOptional": 0,
182+
"total": 262
183+
}
184+
}
185+
}

0 commit comments

Comments
 (0)