PY-19473 Fixed: Incorrect sql injection detected

Update "COPY FROM/TO" regexp to decrease false positives
This commit is contained in:
Semyon Proshev
2016-05-11 14:01:24 +03:00
parent fc180105cc
commit 4925746bf7

View File

@@ -57,7 +57,7 @@
<place><![CDATA[pyStringLiteralMatches("^(\\s*((((--|#)[^\n\r]*)|(/\\*([^*]|\\*[^/])*\\*+/))(\r\n|\n|\r))+)?\\s*(WITH\\s.+?\\sAS\\s.+)")]]></place>
<!-- WITH smth AS smth-->
<place><![CDATA[pyStringLiteralMatches("^(\\s*((((--|#)[^\n\r]*)|(/\\*([^*]|\\*[^/])*\\*+/))(\r\n|\n|\r))+)?\\s*(COPY\\s.+?\\s(FROM|TO)\\s.+)")]]></place>
<place><![CDATA[pyStringLiteralMatches("^(\\s*((((--|#)[^\n\r]*)|(/\\*([^*]|\\*[^/])*\\*+/))(\r\n|\n|\r))+)?\\s*(COPY\\s.+?\\s(FROM|TO)\\s.+;\$)")]]></place>
<!-- COPY smth (FROM|TO) smth -->
<place><![CDATA[pyStringLiteralMatches("^(\\s*((((--|#)[^\n\r]*)|(/\\*([^*]|\\*[^/])*\\*+/))(\r\n|\n|\r))+)?\\s*(CREATE\\s+(OR\\s+REPLACE\\s+)?TRIGGER\\s.+?\\sON\\s.+)")]]></place>