File tree Expand file tree Collapse file tree
test/stubs/apache-commons-lang3-3.7/org/apache/commons/lang3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848 the <code >Access-Control-Allow-Origin</code > header when the
4949 <code >Access-Control-Allow-Credentials</code > header value is
5050 <code >true</code >.This can be done using a sandboxed iframe. A more detailed
51- explanation is available in the portswigger blogpost.
51+ explanation is available in the portswigger blogpost referenced below .
5252
5353 </p >
5454</recommendation >
Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ import DataFlow::PathGraph
1919 * Holds if `header` sets `Access-Control-Allow-Credentials` to `true`. This ensures fair chances of exploitability.
2020 */
2121private predicate setsAllowCredentials ( MethodAccess header ) {
22+ (
23+ header .getMethod ( ) instanceof ResponseSetHeaderMethod or
24+ header .getMethod ( ) instanceof ResponseAddHeaderMethod
25+ ) and
2226 header .getArgument ( 0 ) .( CompileTimeConstantExpr ) .getStringValue ( ) .toLowerCase ( ) =
2327 "access-control-allow-credentials" and
2428 header .getArgument ( 1 ) .( CompileTimeConstantExpr ) .getStringValue ( ) = "true"
@@ -39,10 +43,6 @@ class CorsOriginConfig extends TaintTracking::Configuration {
3943 corsheader .getMethod ( ) instanceof ResponseSetHeaderMethod or
4044 corsheader .getMethod ( ) instanceof ResponseAddHeaderMethod
4145 ) and
42- (
43- allowcredentialsheader .getMethod ( ) instanceof ResponseSetHeaderMethod or
44- allowcredentialsheader .getMethod ( ) instanceof ResponseAddHeaderMethod
45- ) and
4646 getAccessControlAllowOriginHeaderName ( ) = corsheader .getArgument ( 0 ) and
4747 setsAllowCredentials ( allowcredentialsheader ) and
4848 corsheader .getEnclosingCallable ( ) = allowcredentialsheader .getEnclosingCallable ( ) and
Original file line number Diff line number Diff line change 22
33public class StringUtils {
44 public static boolean isEmpty (final CharSequence cs ) {
5- return cs == null || cs . length () == 0 ;
5+ return true ;
66 }
77}
You can’t perform that action at this time.
0 commit comments