Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e57a7d commit aa1c8c0Copy full SHA for aa1c8c0
2 files changed
javascript/ql/src/semmle/javascript/security/dataflow/RegExpInjectionCustomizations.qll
@@ -27,7 +27,10 @@ module RegExpInjection {
27
* expression injection.
28
*/
29
class RemoteFlowSourceAsSource extends Source {
30
- RemoteFlowSourceAsSource() { this instanceof RemoteFlowSource }
+ RemoteFlowSourceAsSource() {
31
+ this instanceof RemoteFlowSource and
32
+ not this instanceof ClientSideRemoteFlowSource
33
+ }
34
}
35
36
/**
javascript/ql/test/query-tests/Security/CWE-730/client-side.js
@@ -0,0 +1,4 @@
1
+function foo() {
2
+ let taint = window.location.hash.substring(1);
3
+ new RegExp(taint); // OK - we do not flag RegExp injection on the client side as the impact is too low
4
+}
0 commit comments