File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,22 @@ class ImageLookup {
77 /* Can read any file in the server by passing the filename (image) in the query params */
88 /* ex: http GET http://localhost:8089/api/v1/image-lookup image=="package.json" */
99 const fileContent = fs . readFileSync ( req . query . image ) . toString ( ) ;
10- string sanitizedString = sanitizeString ( fileContent )
11- logger . debug ( sanitizedString ) ;
12- // logger.debug(fileContent);
10+
11+ // **************************************************
12+ // ************************************************** Vulnerable Code Block *****
13+
14+ logger . debug ( fileContent ) ;
15+
16+ // **************************************************
17+
18+ // ************************************************** Remediated Code Block *****
19+
20+ // string sanitizedStr = sanitizeString(fileContent)
21+ // fileContent = sanitizedStr;
22+ // logger.debug(sanitizedStr);
23+
24+ // **************************************************
25+
1326 res . send ( fileContent ) ;
1427 }
1528
You can’t perform that action at this time.
0 commit comments