Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 402b239

Browse files
author
Sauyon Lee
authored
Merge pull request #300 from srt32/patch-1
Update bad / good message for CWE 079
2 parents 5dc8228 + bd9100e commit 402b239

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ql/src/Security/CWE-079/ReflectedXssGood.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func serve1() {
1111
r.ParseForm()
1212
username := r.Form.Get("username")
1313
if !isValidUsername(username) {
14-
// BAD: a request parameter is incorporated without validation into the response
14+
// GOOD: a request parameter is escaped before being put into the response
1515
fmt.Fprintf(w, "%q is an unknown user", html.EscapeString(username))
1616
} else {
1717
// TODO: do something exciting

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func serve1() {
1111
r.ParseForm()
1212
username := r.Form.Get("username")
1313
if !isValidUsername(username) {
14-
// BAD: a request parameter is incorporated without validation into the response
14+
// GOOD: a request parameter is escaped before being put into the response
1515
fmt.Fprintf(w, "%q is an unknown user", html.EscapeString(username))
1616
} else {
1717
// TODO: do something exciting

0 commit comments

Comments
 (0)