Skip to content

Commit 8c8e71d

Browse files
Grammar, concision, and style edits
Co-authored-by: Sam Browning <[email protected]>
1 parent 7c4bd50 commit 8c8e71d

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

java/ql/src/Security/CWE/CWE-200/AndroidWebViewSettingsFileAccess.qhelp

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
<qhelp>
55
<overview>
66
<p>
7-
File access in an Android WebView can expose the device's file system to
8-
the JavaScript running in the WebView. If there are vulnerabilities in the
9-
JavaScript or untrusted content is loaded in the WebView, file access may
10-
allow an attacker to access or steal the user's data.
7+
Allowing file access in an Android WebView can expose a device's file system to
8+
the JavaScript running in that WebView. If the JavaScript contains
9+
vulnerabilities or the WebView loads untrusted content, file access
10+
allows an attacker to steal the user's data.
1111
</p>
1212
</overview>
1313

1414
<recommendation>
15-
<p>When possible, you should not allow file access. The file access settings
16-
are disabled by default. You can explicitly disbale them by setting the
15+
<p>When possible, do not allow file access. The file access settings
16+
are disabled by default. You can explicitly disable file access by setting the
1717
following settings to <code>false</code>:</p>
1818

1919
<ul>
@@ -23,14 +23,14 @@
2323
</ul>
2424

2525
<p>If your application requires access to the file system, it is best to
26-
avoid using <code>file://</code> urls, and instead use an alternative that
27-
allows loading files via https, such
26+
avoid using <code>file://</code> URLs. Instead, use an alternative that
27+
loads files via HTTPS, such
2828
as <code>androidx.webkit.WebViewAssetLoader</code>.</p>
2929
</recommendation>
3030

3131
<example>
32-
<p>In the following (bad) example, the WebView is configured with the settings
33-
which would allow local file access.</p>
32+
<p>In the following (bad) example, the WebView is configured with settings
33+
that allow local file access.</p>
3434

3535
<sample src="WebViewFileAccessUnsafe.java"/>
3636

@@ -39,8 +39,9 @@
3939
<sample src="WebViewFileAccessSafe.java"/>
4040

4141
<p>
42-
In the following example, an asset loader is configured so that assets can
43-
be access over <code>https</code>, and not require file system access.
42+
As mentioned previously, asset loaders can load files without file system
43+
access. In the following (good) example, an asset loader is configured to
44+
load assets over HTTPS.
4445
</p>
4546

4647
<sample src="AssetLoaderExample.java"/>

0 commit comments

Comments
 (0)