You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Squashed commit of the following:
commit f85e51644ed68a74dd5fbe7a79c17e62e02aed01
Author: Tom Spencer <tom.spencer@studiozeffa.com>
Date: Fri Jan 14 10:47:41 2022 +0000
Removed unnecessary file
commit 059be6ba7fb8a4d6e80147a94b03a064f1a43fcc
Merge: 565c1ea55a16c7
Author: Tom Spencer <tom.spencer@studiozeffa.com>
Date: Fri Jan 14 10:46:46 2022 +0000
Merge branch 'master' of github.com:Blagoj5/express-mongo-sanitize into Blagoj5-master
commit 55a16c7
Merge: 16534f29cc5240
Author: Blagoj <blagoj.petrov5@gmail.com>
Date: Wed May 12 18:22:57 2021 +0200
Merge github.com:fiznool/express-mongo-sanitize
commit 16534f2
Author: Blagoj <blagoj.petrov5@gmail.com>
Date: Wed May 12 17:07:35 2021 +0200
Clean code and fix tests
commit 565c1ea
Author: Tom Spencer <tom.spencer@studiozeffa.com>
Date: Tue May 11 16:47:57 2021 +0100
Bump package version to 2.1.0
commit 05e39bb
Author: Blagoj <blagoj.petrov5@gmail.com>
Date: Sat Jan 23 16:40:25 2021 +0100
feat: Adding new options (options.allowDots)
Adding new option/feature, options.allowDots that is used for skipping the sanitization of data that has .(dot). This can be useful for nested document quering for mongoDb: https://docs.mongodb.com/manual/tutorial/query-embedded-documents/
Creating new tests that include the new option
Updating the documentation (README.md) file for the new option
Adressing issue: #36
commit 287075b
Author: Blagoj <blagoj.petrov5@gmail.com>
Date: Sat Jan 23 16:38:15 2021 +0100
feat: Adding new options (options.allowDots)
Adding new option/feature, options.allowDots that is used for skipping the sanitization of data that has .(dot). This can be useful for nested document quering for mongoDb: https://docs.mongodb.com/manual/tutorial/query-embedded-documents/
Creating new tests that include the new option
Updating the documentation (README.md) file for the new option
Adressing issue: #36
commit aec9249
Author: Blagoj <blagoj.petrov5@gmail.com>
Date: Sat Jan 23 16:17:53 2021 +0100
feat: Adding new options (options.allowDots)
Adding new option/feature, options.allowDots that is used for skipping the sanitization of data that has .(dot). This can be useful for nested document quering for mongoDb: https://docs.mongodb.com/manual/tutorial/query-embedded-documents/
Creating new tests that include the new option
Updating the documentation (README.md) file for the new option
Adressing issue: #36
// Exclude sanitization of . (dot), only sanitize data that contains $. This may cause some problems on older versions of mongo db
106
+
mongoSanitize.sanitize(payload, {
107
+
allowDots:true
108
+
});
109
+
110
+
// Both allowDots and replaceWith
111
+
mongoSanitize.sanitize(payload, {
112
+
allowDots:true,
113
+
replaceWith:'_'
114
+
});
115
+
88
116
// Check if the payload has keys with prohibited characters
89
117
consthasProhibited=mongoSanitize.has(payload);
118
+
119
+
// Check if the payload has keys with prohibited characters (`.` is excluded). So if the payload only has `.` it will return false (since it doesn't see the data with `.` as a malicious data)
0 commit comments