Skip to content

Commit 3f5170f

Browse files
committed
tweaks for code cleanup
1 parent 0757ed1 commit 3f5170f

File tree

8 files changed

+6
-31
lines changed

8 files changed

+6
-31
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": "\\component_type\\component_type_internal_attacks.js",
1515
"PreviewInSolutionExplorer": false
1616
}
Binary file not shown.

.vs/slnx.sqlite

0 Bytes
Binary file not shown.

bson-objectid/attack.js

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ console.log(ObjectID.isValid(ObjectID(payload)));
2929
}
3030

3131
function jsonDemo(input) {
32+
console.log(input);
33+
console.log(ObjectID(input));
34+
console.log(ObjectID(input).id);
3235
return ("bson-object ID says the id should be " + ObjectID(input).id);
3336
}
3437

class-validator/class-validator_handling.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var classValidator = require('class-validator');
33

44
//var mysql = require('mysql2/promise')
55

6-
function bypassedValidation(emailInput, passwordInput, connection) {
6+
function login(emailInput, passwordInput, connection) {
77
const sqlquery1 = `SELECT * FROM login WHERE email = ${emailInput} AND password = ${passwordInput}`;
88
console.log(sqlquery1);
99
return new Promise(function (resolve, reject) {
@@ -48,7 +48,7 @@ function jsonHandle(emailInput)
4848
resolve("Class validator failed to validate user ");
4949
} else {
5050
console.log('valid email and password, user successfully validated. Relevant Database Information:');
51-
bypassedValidation(test1Param.email, test1Param.password, connection).then((results) => {
51+
login(test1Param.email, test1Param.password, connection).then((results) => {
5252

5353
if (results.length == 0) {
5454
resolve("No user found");

component_type/component_type_handling.js

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ function demoSupplyChain(input)
1919

2020
}
2121

22-
/// debugging aid function for testing
2322
function demoValOfFix(obj)
2423
{
2524
if (typeof obj.valueOf === 'function')

data/component_type_buffer_payload

Whitespace-only changes.

jpv/2.2.1_JPV_internal_attack.js

-27
Original file line numberDiff line numberDiff line change
@@ -40,31 +40,4 @@ function exampleJPV() {
4040
if (!Object.prototype.hasOwnProperty.call(schema.aMap, "constructor")) {
4141
console.log("Return True here");
4242
}
43-
44-
45-
//for (const property in input.aMap) {
46-
// console.log(property);
47-
48-
// if (property == "constructor") {
49-
// console.log("found constructor");
50-
// }
51-
// console.log((Object.prototype.hasOwnProperty.call(input.aMap, String(property))));
52-
// if (Object.prototype.hasOwnProperty.call(input.aMap, String(property))) {
53-
// console.log("now here");
54-
// console.log(property);
55-
56-
// console.log(Object.prototype.hasOwnProperty.call(input.aMap, "constructor"));
57-
// console.log(Object.prototype.hasOwnProperty.call(schema.aMap, "constructor"))
58-
59-
// if (!Object.prototype.hasOwnProperty.call(schema, String(property))) {
60-
// console.log("checked schema");
61-
// }
62-
//if ((typeof input[property] === 'object') &&
63-
// (typeof schema[property] === 'object') &&
64-
// (Object.keys(schema[property]).length !== 0)) {
65-
// return (valid = iterate(value[property], pattern[property], valid, cb, options));
66-
//}
67-
}
68-
}
69-
7043
}

0 commit comments

Comments
 (0)