File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
java/ql/test/query-tests/security/CWE-749 Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,19 @@ import android.webkit.WebViewClient
9
9
class UnsafeActivityKt : Activity () {
10
10
override fun onCreate (savedInstanceState : Bundle ) {
11
11
12
+ val src : String = intent.extras.getString(" url" )
13
+
12
14
val wv = findViewById<WebView >(- 1 )
13
15
// Implicit not-nulls happening here
14
16
wv.settings.setJavaScriptEnabled(true )
15
17
wv.settings.setAllowFileAccessFromFileURLs(true )
16
18
17
- val thisUrl : String = intent.extras.getString(" url" )
18
- 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
19
26
}
20
27
}
You can’t perform that action at this time.
0 commit comments