Skip to content

Commit 3a5962a

Browse files
author
Esben Sparre Andreasen
committed
JS: minor fixups in ClientRequests.qll
1 parent b8877f1 commit 3a5962a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private string httpMethodName() {
6767
}
6868

6969
/**
70-
* Gets the name of a property that likely contains a URL value.
70+
* Gets the name of a property that likely contains a URL value.
7171
*/
7272
private string urlPropertyName() {
7373
result = "uri" or
@@ -93,16 +93,13 @@ private class RequestUrlRequest extends CustomClientRequest {
9393
(
9494
callee = DataFlow::moduleImport(moduleName) or
9595
callee = DataFlow::moduleMember(moduleName, httpMethodName())
96-
) and
97-
(
98-
url = getArgument(0) or
99-
url = getOptionArgument(0, urlPropertyName())
10096
)
10197
)
10298
}
10399

104100
override DataFlow::Node getUrl() {
105-
result = url
101+
result = getArgument(0) or
102+
result = getOptionArgument(0, urlPropertyName())
106103
}
107104

108105
override DataFlow::Node getADataNode() {

0 commit comments

Comments
 (0)