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
99class UnsafeActivityKt : Activity () {
1010 override fun onCreate (savedInstanceState : Bundle ) {
1111
12+ val src : String = intent.extras.getString(" url" )
13+
1214 val wv = findViewById<WebView >(- 1 )
1315 // Implicit not-nulls happening here
1416 wv.settings.setJavaScriptEnabled(true )
1517 wv.settings.setAllowFileAccessFromFileURLs(true )
1618
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
1926 }
2027}
You can’t perform that action at this time.
0 commit comments