Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 64f1260

Browse files
committed
JS: Rename getResponseFormat => getResponseType
1 parent 7fb6615 commit 64f1260

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

javascript/ql/src/semmle/javascript/frameworks/ClientRequests.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,20 @@ module ClientRequest {
142142

143143
override DataFlow::Node getHost() { none() }
144144

145-
string getResponseFormat() {
145+
string getResponseType() {
146146
if getOptionArgument(1, "json").mayHaveBooleanValue(true) then
147147
result = "json"
148148
else
149149
result = "text"
150150
}
151151

152152
override DataFlow::Node getAResponseDataNode(string responseType, boolean pr) {
153-
responseType = getResponseFormat() and
153+
responseType = getResponseType() and
154154
promise = true and
155155
pr = true and
156156
result = this
157157
or
158-
responseType = getResponseFormat() and
158+
responseType = getResponseType() and
159159
promise = false and
160160
pr = false and
161161
(
@@ -215,7 +215,7 @@ module ClientRequest {
215215
)
216216
}
217217

218-
string getResponseFormat() {
218+
string getResponseType() {
219219
exists(DataFlow::Node option | option = getOptionArgument([0 .. 2], "responseType") |
220220
result = option.getStringValue()
221221
or
@@ -228,7 +228,7 @@ module ClientRequest {
228228
}
229229

230230
override DataFlow::Node getAResponseDataNode(string responseType, boolean promise) {
231-
responseType = getResponseFormat() and
231+
responseType = getResponseType() and
232232
promise = true and
233233
result = this
234234
}

0 commit comments

Comments
 (0)