Skip to content

Commit eca2c21

Browse files
committed
Swift: Model referrerURL.
1 parent bc4724b commit eca2c21

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private class UserActivityUrlInheritTaint extends TaintInheritingContent,
8181
{
8282
UserActivityUrlInheritTaint() {
8383
this.getField().getEnclosingDecl().asNominalTypeDecl().getName() = "NSUserActivity" and
84-
this.getField().getName() = "webpageURL"
84+
this.getField().getName() = ["webpageURL", "referrerURL"]
8585
}
8686
}
8787

swift/ql/test/library-tests/dataflow/flowsources/customurlschemes.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ class SceneDelegate : UISceneDelegate {
107107
let x = `continue`.webpageURL
108108
x // $ tainted
109109
let y = `continue`.referrerURL
110-
y // $ MISSING: tainted
110+
y // $ tainted
111111
}
112112

113113
func scene(_: UIScene, didUpdate: NSUserActivity) { // $ source=remote
114114
let x = didUpdate.webpageURL
115115
x // $ tainted
116116
let y = didUpdate.referrerURL
117-
y // $ MISSING: tainted
117+
y // $ tainted
118118
}
119119

120120
func scene(_: UIScene, openURLContexts: Set<UIOpenURLContext>) { // $ source=remote
@@ -146,14 +146,14 @@ extension Extended : UISceneDelegate {
146146
let x = `continue`.webpageURL
147147
x // $ tainted
148148
let y = `continue`.referrerURL
149-
y // $ MISSING: tainted
149+
y // $ tainted
150150
}
151151

152152
func scene(_: UIScene, didUpdate: NSUserActivity) { // $ source=remote
153153
let x = didUpdate.webpageURL
154154
x // $ tainted
155155
let y = didUpdate.referrerURL
156-
y // $ MISSING: tainted
156+
y // $ tainted
157157
}
158158

159159
func scene(_: UIScene, openURLContexts: Set<UIOpenURLContext>) { // $ source=remote

0 commit comments

Comments
 (0)