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