File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
java/ql/src/Security/CWE/CWE-079 Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 4
4
<qhelp >
5
5
<overview >
6
6
<p >
7
- The <code >addJavascriptInterface</code > method of
7
+ Calling the <code >addJavascriptInterface</code > method of
8
8
the <code >android.webkit.WebView</code > class allows the web pages of a
9
- WebView to access methods of a Java object via JavaScript.
9
+ WebView to access a Java object's methods via JavaScript.
10
10
</p >
11
11
12
12
<p >
13
- Objects exposed to Javascript are available in all frames of the
13
+ Objects exposed to JavaScript are available in all frames of the
14
14
WebView.
15
15
</p >
16
16
</overview >
17
17
18
18
<recommendation >
19
19
<p >
20
- If you need to expose Java objects with Javascript, you should guarantee
21
- that no untrusted third party content is loaded into the WebView.
20
+ If you need to expose Java objects to JavaScript, guarantee that no
21
+ untrusted third- party content is loaded into the WebView.
22
22
</p >
23
23
</recommendation >
24
24
25
25
<example >
26
26
<p >
27
- In the following (bad) example, a Java object is exposed to Javascript .
27
+ In the following (bad) example, a Java object is exposed to JavaScript .
28
28
</p >
29
29
30
30
<sample src =" AndroidWebViewAddJavascriptInterfaceExample.java" />
33
33
34
34
<references >
35
35
<li >
36
- Android Documentation<a href =" https://developer.android.com/reference/android/webkit/WebView#addJavascriptInterface(java.lang.Object" >addJavascriptInterface</a >
36
+ Android Documentation: <a href =" https://developer.android.com/reference/android/webkit/WebView#addJavascriptInterface(java.lang.Object,%20java.lang.String) " >addJavascriptInterface</a >
37
37
</li >
38
38
</references >
39
39
You can’t perform that action at this time.
0 commit comments