We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3e06ee commit 2ae0c7eCopy full SHA for 2ae0c7e
javascript/ql/src/Security/CWE-918/examples/RequestForgeryGood.js
@@ -1,10 +1,9 @@
1
import http from 'http';
2
-import url from 'url';
3
4
-var server = http.createServer(function(req, res) {
5
- var target = url.parse(req.url, true).query.target;
+const server = http.createServer(function(req, res) {
+ const target = new URL(req.url).searchParams.get("target");
6
7
- var subdomain;
+ const subdomain;
8
if (target === 'EU') {
9
subdomain = "europe"
10
} else {
0 commit comments