Skip to content

Commit 22991b3

Browse files
committed
JS: Accept to web socket-based SSRF alerts
1 parent 91deb4e commit 22991b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

javascript/ql/test/query-tests/Security/CWE-918/serverSide.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ import * as ws from 'ws';
106106
new ws.Server({ port: 8080 }).on('connection', function(socket, request) {
107107
socket.on('message', function(message) {
108108
const url = request.url;
109-
const socket = new ws(url);
109+
const socket = new ws(url); // $ Alert[js/request-forgery]
110110
});
111111
});
112112

113113
new ws.Server({ port: 8080 }).on('connection', function (socket, request) {
114114
socket.on('message', function (message) {
115115
const url = new URL(request.url, base);
116116
const target = new URL(url.pathname, base);
117-
const socket = new ws(url);
117+
const socket = new ws(url); // $ Alert[js/request-forgery]
118118
});
119119
});
120120

0 commit comments

Comments
 (0)