Skip to content

Commit 95f994a

Browse files
Update RequestForgeryBad.js
1 parent 7d674e7 commit 95f994a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/ql/src/Security/CWE-918/examples/RequestForgeryBad.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import http from 'http';
22

33
const server = http.createServer(function(req, res) {
4-
const target = new URL(req.url).searchParams.get("target");
4+
const target = new URL(req.url, "http://example.com").searchParams.get("target");
55

66
// BAD: `target` is controlled by the attacker
77
http.get('https://' + target + ".example.com/data/", res => {

0 commit comments

Comments
 (0)