mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
remove client-side remote-flow from js/resource-exhaustion
This commit is contained in:
@@ -28,7 +28,9 @@ module ResourceExhaustion {
|
||||
abstract class Sanitizer extends DataFlow::Node { }
|
||||
|
||||
/** A source of remote user input, considered as a data flow source for resource exhaustion vulnerabilities. */
|
||||
class RemoteFlowSourceAsSource extends Source instanceof RemoteFlowSource { }
|
||||
class RemoteFlowSourceAsSource extends Source instanceof RemoteFlowSource {
|
||||
RemoteFlowSourceAsSource() { not this instanceof ClientSideRemoteFlowSource }
|
||||
}
|
||||
|
||||
/**
|
||||
* A node that determines the repetitions of a string, considered as a data flow sink for resource exhaustion vulnerabilities.
|
||||
|
||||
@@ -92,3 +92,10 @@ var server = http.createServer(function(req, res) {
|
||||
Buffer.alloc(n); // NOT OK - NO length check
|
||||
}
|
||||
});
|
||||
|
||||
function browser() {
|
||||
const delay = parseInt(window.location.search.replace('?', '')) || 5000;
|
||||
setTimeout(() => {
|
||||
console.log("f00");
|
||||
}, delay); // OK - source is client side
|
||||
}
|
||||
Reference in New Issue
Block a user