@@ -26,19 +26,33 @@ protocol UIApplicationDelegate {
26
26
}
27
27
28
28
class UIScene {
29
- class ConnectionOptions { }
29
+ class ConnectionOptions {
30
+ var userActivities : Set < NSUserActivity > { get { return Set ( ) } }
31
+ var urlContexts : Set < UIOpenURLContext > { get { return Set ( ) } }
32
+ }
30
33
}
31
34
32
35
class UISceneSession { }
33
36
34
- class NSUserActivity { }
37
+ class NSUserActivity : Hashable {
38
+ static func == ( lhs: NSUserActivity , rhs: NSUserActivity ) -> Bool {
39
+ return true ;
40
+ }
41
+
42
+ func hash( into hasher: inout Hasher ) { }
43
+
44
+ var webpageURL : URL ? { get { return nil } set { } }
45
+ var referrerURL : URL ? { get { return nil } set { } }
46
+ }
35
47
36
48
class UIOpenURLContext : Hashable {
37
49
static func == ( lhs: UIOpenURLContext , rhs: UIOpenURLContext ) -> Bool {
38
50
return true ;
39
51
}
40
52
41
53
func hash( into hasher: inout Hasher ) { }
54
+
55
+ var url : URL { get { return URL ( ) } }
42
56
}
43
57
44
58
protocol UISceneDelegate {
@@ -64,28 +78,88 @@ class AppDelegate: UIApplicationDelegate {
64
78
}
65
79
66
80
func application( _ application: UIApplication , didFinishLaunchingWithOptions launchOptions: [ UIApplication . LaunchOptionsKey : Any ] ? ) -> Bool {
67
- launchOptions ? [ . url] // $ source=remote
81
+ _ = launchOptions ? [ . url] // $ source=remote
68
82
return true
69
83
}
70
84
71
85
func application( _ application: UIApplication , willFinishLaunchingWithOptions launchOptions: [ UIApplication . LaunchOptionsKey : Any ] ? ) -> Bool {
72
- launchOptions ? [ . url] // $ source=remote
86
+ _ = launchOptions ? [ . url] // $ source=remote
73
87
return true
74
88
}
75
89
}
76
90
77
91
class SceneDelegate : UISceneDelegate {
78
- func scene( _: UIScene , willConnectTo: UISceneSession , options: UIScene . ConnectionOptions ) { } // $ source=remote
79
- func scene( _: UIScene , continue: NSUserActivity ) { } // $ source=remote
80
- func scene( _: UIScene , didUpdate: NSUserActivity ) { } // $ source=remote
81
- func scene( _: UIScene , openURLContexts: Set < UIOpenURLContext > ) { } // $ source=remote
92
+ func scene( _: UIScene , willConnectTo: UISceneSession , options: UIScene . ConnectionOptions ) { // $ source=remote
93
+ for userActivity in options. userActivities {
94
+ let x = userActivity. webpageURL
95
+ x // $ MISSING: tainted
96
+ let y = userActivity. referrerURL
97
+ y // $ MISSING: tainted
98
+ }
99
+
100
+ for urlContext in options. urlContexts {
101
+ let z = urlContext. url
102
+ z // $ MISSING: tainted
103
+ }
104
+ }
105
+
106
+ func scene( _: UIScene , continue: NSUserActivity ) { // $ source=remote
107
+ let x = `continue`. webpageURL
108
+ x // $ tainted
109
+ let y = `continue`. referrerURL
110
+ y // $ MISSING: tainted
111
+ }
112
+
113
+ func scene( _: UIScene , didUpdate: NSUserActivity ) { // $ source=remote
114
+ let x = didUpdate. webpageURL
115
+ x // $ tainted
116
+ let y = didUpdate. referrerURL
117
+ y // $ MISSING: tainted
118
+ }
119
+
120
+ func scene( _: UIScene , openURLContexts: Set < UIOpenURLContext > ) { // $ source=remote
121
+ for openURLContext in openURLContexts {
122
+ let x = openURLContext. url
123
+ x // $ MISSING: tainted
124
+ }
125
+ }
82
126
}
83
127
84
128
class Extended { }
85
129
86
130
extension Extended : UISceneDelegate {
87
- func scene( _: UIScene , willConnectTo: UISceneSession , options: UIScene . ConnectionOptions ) { } // $ source=remote
88
- func scene( _: UIScene , continue: NSUserActivity ) { } // $ source=remote
89
- func scene( _: UIScene , didUpdate: NSUserActivity ) { } // $ source=remote
90
- func scene( _: UIScene , openURLContexts: Set < UIOpenURLContext > ) { } // $ source=remote
131
+ func scene( _: UIScene , willConnectTo: UISceneSession , options: UIScene . ConnectionOptions ) { // $ source=remote
132
+ for userActivity in options. userActivities {
133
+ let x = userActivity. webpageURL
134
+ x // $ MISSING: tainted
135
+ let y = userActivity. referrerURL
136
+ y // $ MISSING: tainted
137
+ }
138
+
139
+ for urlContext in options. urlContexts {
140
+ let z = urlContext. url
141
+ z // $ MISSING: tainted
142
+ }
143
+ }
144
+
145
+ func scene( _: UIScene , continue: NSUserActivity ) { // $ source=remote
146
+ let x = `continue`. webpageURL
147
+ x // $ tainted
148
+ let y = `continue`. referrerURL
149
+ y // $ MISSING: tainted
150
+ }
151
+
152
+ func scene( _: UIScene , didUpdate: NSUserActivity ) { // $ source=remote
153
+ let x = didUpdate. webpageURL
154
+ x // $ tainted
155
+ let y = didUpdate. referrerURL
156
+ y // $ MISSING: tainted
157
+ }
158
+
159
+ func scene( _: UIScene , openURLContexts: Set < UIOpenURLContext > ) { // $ source=remote
160
+ for openURLContext in openURLContexts {
161
+ let x = openURLContext. url
162
+ x // $ MISSING: tainted
163
+ }
164
+ }
91
165
}
0 commit comments