Skip to content

Commit dbf01a9

Browse files
committed
fix an issue in ResponseBody, change isHTMLEscape to isHtmlEscape
1 parent 20a3211 commit dbf01a9

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

go/ql/lib/semmle/go/frameworks/Fasthttp.qll

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ module Fasthttp {
101101
this = call.getArgument(0)
102102
or
103103
m.hasQualifiedName(packagePath(), "RequestCtx", ["Success", "SuccessString"]) and
104-
this = m.getACall().getArgument(1)
104+
call = m.getACall() and
105+
this = call.getArgument(1)
105106
) and
106107
methodName =
107108
[
@@ -149,19 +150,19 @@ module Fasthttp {
149150
* A function that can be used as a sanitizer for XSS.
150151
*/
151152
class HtmlQuoteSanitizer extends EscapeFunction::Range {
152-
boolean isHTMLEscape;
153+
boolean isHtmlEscape;
153154

154155
HtmlQuoteSanitizer() {
155156
this.hasQualifiedName(packagePath(), ["AppendHTMLEscape", "AppendHTMLEscapeBytes"]) and
156-
isHTMLEscape = true
157+
isHtmlEscape = true
157158
or
158-
this.hasQualifiedName(packagePath(), "AppendQuotedArg") and isHTMLEscape = false
159+
this.hasQualifiedName(packagePath(), "AppendQuotedArg") and isHtmlEscape = false
159160
}
160161

161162
override string kind() {
162-
isHTMLEscape = true and result = "html"
163+
isHtmlEscape = true and result = "html"
163164
or
164-
isHTMLEscape = false and result = "url"
165+
isHtmlEscape = false and result = "url"
165166
}
166167
}
167168

0 commit comments

Comments
 (0)