2021-10-12 09:46:11 +02:00
|
|
|
include::../description.adoc[]
|
|
|
|
|
|
|
|
include::../ask-yourself.adoc[]
|
|
|
|
|
|
|
|
include::../recommended.adoc[]
|
|
|
|
|
|
|
|
== Sensitive Code Example
|
|
|
|
|
2023-01-09 15:29:41 +01:00
|
|
|
[source,java]
|
2021-10-12 09:46:11 +02:00
|
|
|
----
|
|
|
|
import android.webkit.WebView;
|
|
|
|
|
|
|
|
WebView webView = (WebView) findViewById(R.id.webview);
|
|
|
|
webView.getSettings().setJavaScriptEnabled(true); // Sensitive
|
|
|
|
----
|
|
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
|
2022-02-04 17:28:24 +01:00
|
|
|
[source,java]
|
2021-10-12 09:46:11 +02:00
|
|
|
----
|
|
|
|
import android.webkit.WebView;
|
|
|
|
|
|
|
|
WebView webView = (WebView) findViewById(R.id.webview);
|
|
|
|
webView.getSettings().setJavaScriptEnabled(false);
|
|
|
|
----
|
|
|
|
|
|
|
|
include::../see.adoc[]
|
|
|
|
|
|
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
|
|
|
|
'''
|
|
|
|
== Implementation Specification
|
|
|
|
(visible only on this page)
|
|
|
|
|
|
|
|
include::../message.adoc[]
|
|
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|