Update java/ql/src/experimental/Security/CWE/CWE-352/JsonpInjectionLib.qll

Co-authored-by: Chris Smowton <smowton@github.com>
This commit is contained in:
haby0
2021-04-10 09:48:55 +08:00
committed by GitHub
parent 046aeaa38c
commit eeae91e620

View File

@@ -100,7 +100,7 @@ class SpringControllerRequestMappingGetMethod extends SpringControllerGetMethod
/** A concatenate expression using `(` and `)` or `);`. */
class JsonpBuilderExpr extends AddExpr {
JsonpInjectionExpr() {
getRightOperand().toString().regexpMatch("\"\\)\"|\"\\);\"") and
getRightOperand().toString().regexpMatch("\"\\);?\"") and
getLeftOperand()
.(AddExpr)
.getLeftOperand()