mirror of
https://github.com/github/codeql.git
synced 2026-04-19 14:04:09 +02:00
Update RequestForgeryBad.js
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import http from 'http';
|
||||
|
||||
const server = http.createServer(function(req, res) {
|
||||
const target = new URL(req.url).searchParams.get("target");
|
||||
const target = new URL(req.url, "http://example.com").searchParams.get("target");
|
||||
|
||||
// BAD: `target` is controlled by the attacker
|
||||
http.get('https://' + target + ".example.com/data/", res => {
|
||||
|
||||
Reference in New Issue
Block a user