Skip to content

Commit 587f9c2

Browse files
committed
Fix inline test expectations comments
1 parent b8c78fd commit 587f9c2

2 files changed

Lines changed: 9 additions & 18 deletions

File tree

go/ql/test/query-tests/Security/CWE-079/ReflectedXss.expected

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,3 @@ nodes
156156
| websocketXss.go:54:3:54:38 | ... := ...[1] | semmle.label | ... := ...[1] |
157157
| websocketXss.go:55:24:55:31 | gorilla3 | semmle.label | gorilla3 |
158158
subpaths
159-
testFailures
160-
| websocketXss.go:30:32:30:60 | comment | Missing result: Source[go/reflected-xss] |
161-
| websocketXss.go:31:11:31:14 | xnet [postupdate] | Unexpected result: Source |
162-
| websocketXss.go:34:30:34:58 | comment | Missing result: Source[go/reflected-xss] |
163-
| websocketXss.go:35:21:35:25 | xnet2 [postupdate] | Unexpected result: Source |
164-
| websocketXss.go:46:38:46:66 | comment | Missing result: Source[go/reflected-xss] |
165-
| websocketXss.go:47:26:47:35 | gorillaMsg [postupdate] | Unexpected result: Source |
166-
| websocketXss.go:50:33:50:61 | comment | Missing result: Source[go/reflected-xss] |
167-
| websocketXss.go:51:17:51:24 | gorilla2 [postupdate] | Unexpected result: Source |

go/ql/test/query-tests/Security/CWE-079/websocketXss.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ func xss(w http.ResponseWriter, r *http.Request) {
2727
origin := "test"
2828
{
2929
ws, _ := websocket.Dial(uri, "", origin)
30-
var xnet = make([]byte, 512) // $ Source[go/reflected-xss]
31-
ws.Read(xnet)
30+
var xnet = make([]byte, 512)
31+
ws.Read(xnet) // $ Source[go/reflected-xss]
3232
fmt.Fprintf(w, "%v", xnet) // $ Alert[go/reflected-xss]
3333
codec := &websocket.Codec{Marshal: marshal, Unmarshal: unmarshal}
34-
xnet2 := make([]byte, 512) // $ Source[go/reflected-xss]
35-
codec.Receive(ws, xnet2)
34+
xnet2 := make([]byte, 512)
35+
codec.Receive(ws, xnet2) // $ Source[go/reflected-xss]
3636
fmt.Fprintf(w, "%v", xnet2) // $ Alert[go/reflected-xss]
3737
}
3838
{
@@ -43,12 +43,12 @@ func xss(w http.ResponseWriter, r *http.Request) {
4343
{
4444
dialer := gorilla.Dialer{}
4545
conn, _, _ := dialer.Dial(uri, nil)
46-
var gorillaMsg = make([]byte, 512) // $ Source[go/reflected-xss]
47-
gorilla.ReadJSON(conn, gorillaMsg)
48-
fmt.Fprintf(w, "%v", gorillaMsg) // $ Alert[go/reflected-xss]
46+
var gorillaMsg = make([]byte, 512)
47+
gorilla.ReadJSON(conn, gorillaMsg) // $ Source[go/reflected-xss]
48+
fmt.Fprintf(w, "%v", gorillaMsg) // $ Alert[go/reflected-xss]
4949

50-
gorilla2 := make([]byte, 512) // $ Source[go/reflected-xss]
51-
conn.ReadJSON(gorilla2)
50+
gorilla2 := make([]byte, 512)
51+
conn.ReadJSON(gorilla2) // $ Source[go/reflected-xss]
5252
fmt.Fprintf(w, "%v", gorilla2) // $ Alert[go/reflected-xss]
5353

5454
_, gorilla3, _ := conn.ReadMessage() // $ Source[go/reflected-xss]

0 commit comments

Comments
 (0)