Skip to content

Commit 47c98a7

Browse files
committed
minor changes
1 parent 824fa54 commit 47c98a7

File tree

6 files changed

+32
-9
lines changed

6 files changed

+32
-9
lines changed

.vs/VSWorkspaceState.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"\\models",
1212
"\\routes"
1313
],
14-
"SelectedNode": "\\class-validator\\class-validator_handling.js",
14+
"SelectedNode": "\\routes\\class-validator.routes.js",
1515
"PreviewInSolutionExplorer": false
1616
}
Binary file not shown.

.vs/slnx.sqlite

0 Bytes
Binary file not shown.

jpv/2.2.1_JPV_internal_attack.js

+25-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ function exampleJPV() {
99
const schema = {
1010
aMap: new Map()
1111
};
12-
12+
console.log(typeof (schema));
13+
1314
console.log("This bad input below tricks jpv");
1415

1516
console.log(" aMap: {\n badcode: \"problematic input.\",\n constructor: new Map().constructor \n }");
@@ -20,8 +21,30 @@ function exampleJPV() {
2021
constructor: new Map.constructor
2122
}
2223
};
23-
24+
2425
// jpv.validate(input, schema) should return false, but, as of 2.2.1, returns true
2526
console.log("jpv.validate(input, schema) = " + jpv.validate(input, schema));
27+
console.log(input.constructor === schema.constructor);
28+
29+
for (const property in input.aMap) {
30+
console.log(property);
31+
console.log("i am here");
32+
if (Object.prototype.hasOwnProperty.call(input.aMap, String(property))) {
33+
console.log("now here");
34+
console.log(property);
35+
36+
console.log(Object.prototype.hasOwnProperty.call(input.aMap, "constructor"));
37+
console.log(Object.prototype.hasOwnProperty.call(schema.aMap, "constructor"))
38+
39+
if (!Object.prototype.hasOwnProperty.call(schema, String(property))) {
40+
console.log("checked schema");
41+
}
42+
//if ((typeof input[property] === 'object') &&
43+
// (typeof schema[property] === 'object') &&
44+
// (Object.keys(schema[property]).length !== 0)) {
45+
// return (valid = iterate(value[property], pattern[property], valid, cb, options));
46+
//}
47+
}
48+
}
2649

2750
}

package-lock.json

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

routes/class-validator.routes.js

Whitespace-only changes.

0 commit comments

Comments
 (0)