GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Apply suggestions from code review · github/codeql@fd92c4e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • java/ql
    • lib/semmle/code/java/security
      • AndroidIntentRedirection.qll
    • src/Security/CWE/CWE-940
      • AndroidIntentRedirectionSample.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎java/ql/lib/semmle/code/java/security/AndroidIntentRedirection.qll‎

Copy file name to clipboardExpand all lines: java/ql/lib/semmle/code/java/security/AndroidIntentRedirection.qll
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,12 @@ private class DefaultIntentRedirectionSink extends IntentRedirectionSink {
7171
*/
7272
private class DefaultIntentRedirectionSanitizer extends IntentRedirectionSanitizer {
7373
DefaultIntentRedirectionSanitizer() {
74-
exists(MethodAccess ma, Method m |
74+
exists(MethodAccess ma, Method m, Guard g, boolean branch |
7575
ma.getMethod() = m and
7676
m.getDeclaringType() instanceof TypeComponentName and
7777
m.hasName(["getPackageName", "getClassName"]) and
78-
ma.getBasicBlock().(ConditionBlock).controls(this.asExpr().getBasicBlock(), true)
78+
g.isEquality(ma, _, branch) and
79+
g.controls(this.asExpr().getBasicBlock(), branch)
7980
)
8081
}
8182
}
Collapse file

‎java/ql/src/Security/CWE/CWE-940/AndroidIntentRedirectionSample.java‎

Copy file name to clipboardExpand all lines: java/ql/src/Security/CWE/CWE-940/AndroidIntentRedirectionSample.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
// GOOD: The component that sent the Intent is checked before launching the destination component
1414
Intent forwardIntent = (Intent) getIntent().getParcelableExtra("forward_intent");
1515
ComponentName originComponent = getCallingActivity();
16-
if (originComponent.getPackageName().equals("trusted.package") && originComponent.getClassName("TrustedClass")) {
16+
if (originComponent.getPackageName().equals("trusted.package") && originComponent.getClassName().equals("TrustedClass")) {
1717
startActivity(forwardIntent);
1818
}

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.