From 5b4f091257444b035e21e18a6cf3ea2489e8f298 Mon Sep 17 00:00:00 2001 From: Erik Krogh Kristensen Date: Mon, 23 Mar 2020 23:58:20 +0100 Subject: [PATCH] add test for remote flow sources in WebSockets --- .../ql/test/library-tests/frameworks/WebSocket/test.expected | 3 +++ javascript/ql/test/library-tests/frameworks/WebSocket/test.ql | 2 ++ 2 files changed, 5 insertions(+) diff --git a/javascript/ql/test/library-tests/frameworks/WebSocket/test.expected b/javascript/ql/test/library-tests/frameworks/WebSocket/test.expected index 2efdb03e865..c3942b8660b 100644 --- a/javascript/ql/test/library-tests/frameworks/WebSocket/test.expected +++ b/javascript/ql/test/library-tests/frameworks/WebSocket/test.expected @@ -30,3 +30,6 @@ taintStep | server.js:11:11:11:27 | 'Hi from server!' | client.js:10:37:10:40 | data | | sockjs.js:11:20:11:50 | JSON.st ... .test)) | browser.js:25:26:25:31 | e.data | | sockjs.js:11:20:11:50 | JSON.st ... .test)) | browser.js:30:42:30:51 | event.data | +remoteFlow +| server.js:7:38:7:44 | message | +| sockjs.js:9:31:9:37 | message | diff --git a/javascript/ql/test/library-tests/frameworks/WebSocket/test.ql b/javascript/ql/test/library-tests/frameworks/WebSocket/test.ql index e7b9d451a55..dd2165e37c9 100644 --- a/javascript/ql/test/library-tests/frameworks/WebSocket/test.ql +++ b/javascript/ql/test/library-tests/frameworks/WebSocket/test.ql @@ -15,3 +15,5 @@ query ServerWebSocket::ReceiveNode serverReceive() { any() } query predicate taintStep(DataFlow::Node pred, DataFlow::Node succ) { any(DataFlow::AdditionalFlowStep s).step(pred, succ) } + +query RemoteFlowSource remoteFlow() { any() }