Skip to content

Commit 7fa9157

Browse files
authored
Merge pull request github#13757 from geoffw0/sources
Swift: Pragmatic fix for CustomUrlSchemes.qll.
2 parents 5b0d4ce + efea11f commit 7fa9157

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

swift/ql/lib/codeql/swift/frameworks/StandardLibrary/CustomUrlSchemes.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ private class ApplicationWithLaunchOptionsFunc extends Function {
5656

5757
private class LaunchOptionsUrlVarDecl extends VarDecl {
5858
LaunchOptionsUrlVarDecl() {
59-
this.getEnclosingDecl().asNominalTypeDecl().getFullName() = "UIApplication.LaunchOptionsKey" and
59+
// ideally this would be the more accurate, but currently less robust:
60+
// this.getEnclosingDecl().asNominalTypeDecl().getFullName() = "UIApplication.LaunchOptionsKey" and
61+
this.getType().(NominalType).getFullName() = "UIApplication.LaunchOptionsKey" and
6062
this.getName() = "url"
6163
}
6264
}

0 commit comments

Comments
 (0)