Skip to content

Commit 32ff0f0

Browse files
authoredMar 20, 2024
Merge pull request #23 from pariazar/fix/broken-whitelist
Fix/broken whitelist
2 parents 4f9c47f + 2eaafbb commit 32ff0f0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
 

‎index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function middleware(
77
) {
88
return (req, res, next) => {
99
only.forEach((k) => {
10-
if (req[k] && !whiteList.some((v) => req.url.trim().includes(v))) {
10+
if (req[k] && !whiteList.some((v) => req.url.trim().startsWith(v))) {
1111
req[k] = sanitize.prepareSanitize(req[k], options);
1212
}
1313
});

‎package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "perfect-express-sanitizer",
3-
"version": "1.0.13",
3+
"version": "1.0.14",
44
"description": "a complete package to control user input data to prevent Cross Site Scripting (XSS) ,Sql injection and no Sql injection attack",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)