Skip to content

Commit ebc6c49

Browse files
author
Porcupiney Hairs
committed
include suggestions from review.
1 parent 402a320 commit ebc6c49

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

java/ql/src/experimental/CWE-918/RequestForgeryCustomizations.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ module RequestForgery {
125125
}
126126

127127
/**
128-
* A URI argument to `org.springframework.http.RequestEntity`s constructor call
129-
* taken as a sink for request forgery vulnerabilities.
128+
* An argument to `org.springframework.http.RequestEntity`s constructor call
129+
* which is an URI taken as a sink for request forgery vulnerabilities.
130130
*/
131131
private class RequestEntityUriArg extends Sink {
132132
RequestEntityUriArg() {

java/ql/src/semmle/code/java/frameworks/ApacheHttp.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class ApacheHttpEntityGetContent extends Method {
1515
}
1616

1717
/**
18-
* Models any class derived from `HttpRequestBase` or the `BasicHttpRequest`
19-
* class of the Apache Http Client `org.apache.http` library
18+
* A class that is derived from the `HttpRequestBase` or the `BasicHttpRequest`
19+
* classes of the Apache HTTP Client `org.apache.http` library
2020
*/
2121
class ApacheHttpRequest extends RefType {
2222
ApacheHttpRequest() {

java/ql/src/semmle/code/java/frameworks/Networking.qll

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class SocketGetInputStreamMethod extends Method {
4242
}
4343
}
4444

45-
/** Any expresion or call which returns a new URI. */
45+
/** A function or method call that returns a new `URI`. */
4646
class UriCreation extends Call {
4747
UriCreation() {
4848
this.getCallee().getDeclaringType() instanceof TypeUri and
@@ -61,8 +61,6 @@ class UriCreation extends Call {
6161

6262
/** An URI constructor expression */
6363
class UriConstructor extends ClassInstanceExpr, UriCreation {
64-
UriConstructor() { this.getConstructor().getDeclaringType().getQualifiedName() = "java.net.URI" }
65-
6664
override Expr getHostArg() {
6765
// URI​(String str)
6866
result = this.getArgument(0) and this.getNumArgument() = 1
@@ -78,7 +76,7 @@ class UriConstructor extends ClassInstanceExpr, UriCreation {
7876
}
7977
}
8078

81-
/** An URI create call */
79+
/** A call to the `create` method of the `java.net.URI` class */
8280
class UriCreate extends Call, UriCreation {
8381
UriCreate() {
8482
this.getCallee().getName() = "create" and
@@ -88,9 +86,9 @@ class UriCreate extends Call, UriCreation {
8886
override Expr getHostArg() { result = this.getArgument(0) }
8987
}
9088

91-
/* An URL constructor expression */
89+
/** An `java.net.URL` constructor expression */
9290
class UrlConstructor extends ClassInstanceExpr {
93-
UrlConstructor() { this.getConstructor().getDeclaringType().getQualifiedName() = "java.net.___URL" }
91+
UrlConstructor() { this.getConstructor().getDeclaringType() instanceof TypeUrl }
9492

9593
/** Returns the host of the newly created URI. */
9694
Expr getHostArg() {

0 commit comments

Comments
 (0)