зеркало из https://github.com/github/codeql.git
Swift: Add a webview test case from a branch that didn't make it.
This commit is contained in:
Родитель
c6bc1a3f3a
Коммит
838a00bbc9
|
@ -52,6 +52,7 @@ protocol Exported : JSExport {
|
|||
var tainted: Any { get }
|
||||
func tainted(arg1: Any, arg2: Any)
|
||||
}
|
||||
|
||||
class ExportedImpl : Exported {
|
||||
var tainted: Any { get { return "" } }
|
||||
|
||||
|
@ -80,3 +81,22 @@ extension Extended : WKNavigationDelegate {
|
|||
func webView(_: WKWebView, decidePolicyFor: WKNavigationAction, preferences: WKWebpagePreferences, decisionHandler: (WKNavigationActionPolicy, WKWebpagePreferences) -> Void) {} // $ source=remote
|
||||
func webView(_: WKWebView, decidePolicyFor: WKNavigationAction, decisionHandler: (WKNavigationActionPolicy) -> Void) {} // $ source=remote
|
||||
}
|
||||
|
||||
// ---
|
||||
|
||||
typealias JSExportAlias = JSExport
|
||||
|
||||
protocol Exported2 : JSExportAlias {
|
||||
var tainted: Any { get }
|
||||
}
|
||||
typealias Exported2Alias = Exported2
|
||||
|
||||
class ExportedImpl2 : Exported2Alias {
|
||||
var tainted: Any { get { return "" } }
|
||||
var notTainted: Any { get { return ""} }
|
||||
|
||||
func readFields() {
|
||||
tainted // $ source=remote
|
||||
notTainted
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче