We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dec4f45 commit 3079397Copy full SHA for 3079397
webgoat/src/main/webapp/lessons/Ajax/eval.jsp
@@ -12,10 +12,11 @@ if(field1 == null) field1 = "123";
12
if(field2 == null) field2 = "-1";
13
14
/** For security reasons, we remove all '<' and '>' characters to prevent XSS **/
15
-field1.replaceAll("<", "");
16
-field1.replaceAll(">", "");
17
-field2.replaceAll("<", "");
18
-field2.replaceAll(">", "");
+// Thank you Victor Bucutea for noticing replaceAll only cleans taint to the return value.
+field1 = field1.replaceAll("<", "");
+field1 = field1.replaceAll(">", "");
+field2 = field2.replaceAll("<", "");
19
+field2 = field2.replaceAll(">", "");
20
21
if("Purchase".equals(action))
22
{
0 commit comments