We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b70e21d commit 16529cdCopy full SHA for 16529cd
1 file changed
java/ql/test/query-tests/security/CWE-749/UnsafeActivityKt.kt
@@ -9,12 +9,19 @@ import android.webkit.WebViewClient
9
class UnsafeActivityKt : Activity() {
10
override fun onCreate(savedInstanceState : Bundle) {
11
12
+ val src : String = intent.extras.getString("url")
13
+
14
val wv = findViewById<WebView>(-1)
15
// Implicit not-nulls happening here
16
wv.settings.setJavaScriptEnabled(true)
17
wv.settings.setAllowFileAccessFromFileURLs(true)
18
- val thisUrl : String = intent.extras.getString("url")
- wv.loadUrl(thisUrl) // $ hasUnsafeAndroidAccess
19
+ wv.loadUrl(src) // $ hasUnsafeAndroidAccess
20
21
+ val wv2 = findViewById<WebView>(-1)
22
+ wv2.apply {
23
+ settings.setJavaScriptEnabled(true)
24
+ }
25
+ wv2.loadUrl(src) // $ hasUnsafeAndroidAccess
26
}
27
0 commit comments