mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
JS: Add test case with encodeURI for request forgery
This commit is contained in:
@@ -141,4 +141,8 @@ var server2 = http.createServer(function(req, res) {
|
||||
axios.get(target.toString()); // $Alert[js/request-forgery]
|
||||
axios.get(target); // $Alert[js/request-forgery]
|
||||
axios.get(target.href); // $Alert[js/request-forgery]
|
||||
const encodedUrl = encodeURI(input);
|
||||
axios.get(encodedUrl); // $MISSING:Alert[js/request-forgery]
|
||||
const escapedUrl = escape(input);
|
||||
axios.get(escapedUrl); // $MISSING:Alert[js/request-forgery]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user