mirror of
https://github.com/github/codeql.git
synced 2026-04-23 07:45:17 +02:00
Replace "javax" with javaxOrJakarta()
This is just a find-replace of `"javax` with `javaxOrJakarta() + "`.
This commit is contained in:
@@ -77,7 +77,9 @@ module MatchesHttpOnlyToRawHeaderFlow = TaintTracking::Global<MatchesHttpOnlyToR
|
||||
|
||||
/** A class descended from `javax.servlet.http.Cookie`. */
|
||||
class CookieClass extends RefType {
|
||||
CookieClass() { this.getAnAncestor().hasQualifiedName("javax.servlet.http", "Cookie") }
|
||||
CookieClass() {
|
||||
this.getAnAncestor().hasQualifiedName(javaxOrJakarta() + ".servlet.http", "Cookie")
|
||||
}
|
||||
}
|
||||
|
||||
/** Holds if `expr` is any boolean-typed expression other than literal `false`. */
|
||||
@@ -143,7 +145,8 @@ class CookieResponseWithoutHttpOnlySink extends DataFlow::ExprNode {
|
||||
|
||||
/** Holds if `cie` is an invocation of a JAX-RS `NewCookie` constructor that sets `HttpOnly` to true. */
|
||||
predicate setsHttpOnlyInNewCookie(ClassInstanceExpr cie) {
|
||||
cie.getConstructedType().hasQualifiedName(["javax.ws.rs.core", "jakarta.ws.rs.core"], "NewCookie") and
|
||||
cie.getConstructedType()
|
||||
.hasQualifiedName([javaxOrJakarta() + ".ws.rs.core", "jakarta.ws.rs.core"], "NewCookie") and
|
||||
(
|
||||
cie.getNumArgument() = 6 and
|
||||
mayBeBooleanTrue(cie.getArgument(5)) // NewCookie(Cookie cookie, String comment, int maxAge, Date expiry, boolean secure, boolean httpOnly)
|
||||
|
||||
@@ -27,7 +27,7 @@ class SocketFactoryType extends RefType {
|
||||
SocketFactoryType() {
|
||||
this.hasQualifiedName("java.rmi.server", "RMIServerSocketFactory") or
|
||||
this.hasQualifiedName("java.rmi.server", "RMIClientSocketFactory") or
|
||||
this.hasQualifiedName("javax.net", "SocketFactory") or
|
||||
this.hasQualifiedName(javaxOrJakarta() + ".net", "SocketFactory") or
|
||||
this.hasQualifiedName("java.net", "SocketImplFactory")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user