mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Test setProperty/put with taint stored earlier
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user