Skip to content

Commit c7072ae

Browse files
committed
update A.java test
1 parent 6b80a42 commit c7072ae

File tree

1 file changed

+5
-5
lines changed
  • java/ql/test/query-tests/security/CWE-502

1 file changed

+5
-5
lines changed

java/ql/test/query-tests/security/CWE-502/A.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ public void deserializeSnakeYaml3(Socket sock) {
8888
public void deserializeSnakeYaml4(Socket sock) {
8989
Yaml yaml = new Yaml(new Constructor(A.class));
9090
InputStream input = sock.getInputStream();
91-
Object o = yaml.load(input); //OK
92-
Object o2 = yaml.loadAll(input); //OK
93-
Object o3 = yaml.parse(new InputStreamReader(input)); //OK
94-
A o4 = yaml.loadAs(input, A.class); //OK
95-
A o5 = yaml.loadAs(new InputStreamReader(input), A.class); //OK
91+
Object o = yaml.load(input); //unsafe
92+
Object o2 = yaml.loadAll(input); //unsafe
93+
Object o3 = yaml.parse(new InputStreamReader(input)); //unsafe
94+
A o4 = yaml.loadAs(input, A.class); //unsafe
95+
A o5 = yaml.loadAs(new InputStreamReader(input), A.class); //unsafe
9696
}
9797
}

0 commit comments

Comments
 (0)