Test setProperty/put with taint stored earlier

This commit is contained in:
intrigus
2022-08-04 16:21:51 +02:00
parent 0b7f0fbe54
commit c867a1a146

View File

@@ -95,4 +95,16 @@ public class Test {
sink(p.getProperty("key")); // Flow
sink(p.getProperty("key", "defaultValue")); // Flow
}
public void run6() {
Properties p = new Properties();
sink(p.put("key", tainted)); // No flow
sink(p.put("key", "notTainted")); // Flow
}
public void run7() {
Properties p = new Properties();
sink(p.setProperty("key", tainted)); // No flow
sink(p.setProperty("key", "notTainted")); // Flow
}
}