wang3820 commented on code in PR #2096:
URL: https://github.com/apache/jena/pull/2096#discussion_r1409557716
##########
jena-arq/src/test/java/org/apache/jena/query/TestParameterizedSparqlString.java:
##########
@@ -1585,6 +1595,15 @@ public void test_param_string_injection_15() {
pss.setLiteral(second, " . } ; DROP ALL ; INSERT DATA { <s> <p> ");
pss.asUpdate();
+ // Due to the unpredictability of the order of parameters in
this.params,
+ // which is a HashMap, here the reverse order is checked to make sure
+ // an ARQException is thrown
+ pss.setLiteral("var", "a");
+ pss.setLiteral("var2", "b");
+
+ pss.setLiteral(second, " ?" + first + " ");
+ pss.setLiteral(first, " . } ; DROP ALL ; INSERT DATA { <s> <p> ");
+
Review Comment:
FIxed! Thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]