41 lines
774 B
Plaintext
41 lines
774 B
Plaintext
include::../description.adoc[]
|
|
|
|
include::../ask-yourself.adoc[]
|
|
|
|
include::../recommended.adoc[]
|
|
|
|
== Sensitive Code Example
|
|
|
|
[source,kotlin]
|
|
----
|
|
import android.webkit.WebView
|
|
|
|
val webView: WebView = findViewById(R.id.webview)
|
|
webView.getSettings().setAllowContentAccess(true) // Sensitive
|
|
webView.getSettings().setAllowFileAccess(true) // Sensitive
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
[source,kotlin]
|
|
----
|
|
import android.webkit.WebView
|
|
|
|
val webView: WebView = findViewById(R.id.webview)
|
|
webView.getSettings().setAllowContentAccess(false)
|
|
webView.getSettings().setAllowFileAccess(false)
|
|
----
|
|
|
|
include::../see.adoc[]
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|