Skip to content

Commit a7e7334

Browse files
committed
Java: Documentation cleanup for setJavascriptEnabled
1 parent 55fad8a commit a7e7334

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

java/ql/src/Security/CWE/CWE-079/AndroidWebViewSettingsEnabledJavaScript.qhelp

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,22 @@
33
"qhelp.dtd">
44
<qhelp>
55
<overview>
6-
<p>
7-
Enabling JavaScript in an Android WebView allows for the running of JavaScript
8-
code in the context of the running application. This opens the possibility for a
9-
man-in-the-middle attack, where the attacker can inject arbitrary JavaScript.
10-
</p>
11-
12-
<p>
13-
You can enable or disbale Javascript execution using
14-
the <code>setJavaScriptEnabled</code> method of the settings of a WebView.
15-
</p>
6+
<p>
7+
Enabling JavaScript in an Android WebView allows for the running of JavaScript
8+
code in the context of the running application. This opens the possibility for
9+
cross-site scripting if the attacker can inject arbitrary JavaScript.
10+
</p>
11+
12+
<p>
13+
For example, if your application's WebView allows for visitng web pages
14+
which you do not trust, it is possible for an attacker to lead the user to
15+
a page which loads malicious JavaScript.
16+
</p>
17+
18+
<p>
19+
You can enable or disbale Javascript execution using
20+
the <code>setJavaScriptEnabled</code> method of the settings of a WebView.
21+
</p>
1622
</overview>
1723

1824
<recommendation>
@@ -33,13 +39,9 @@ man-in-the-middle attack, where the attacker can inject arbitrary JavaScript.
3339
</example>
3440

3541
<references>
36-
<li>
37-
Oversecured Android Vulnerabilities Guide: <a href="https://oversecured.com/vulnerabilities#Android/Enabled_JavaScript">Enabled JavaScript</a>
38-
</li>
3942
<li>
4043
Android documentation: <a href="https://developer.android.com/reference/android/webkit/WebSettings#setJavaScriptEnabled(boolean)">setJavaScriptEnabled</a>
4144
</li>
42-
4345
</references>
4446

4547
</qhelp>

0 commit comments

Comments
 (0)