Skip to content

Commit 5ac1e01

Browse files
committed
Java: Mention AssetLoader in WebView file access query documentation
1 parent c836c4f commit 5ac1e01

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
<li><code>setAllowFileAccessFromFileURLs</code></li>
2222
<li><code>setAllowUniversalAccessFromFileURLs</code></li>
2323
</ul>
24+
25+
<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
28+
as <code>androidx.webkit.WebViewAssetLoader</code>.</p>
2429
</recommendation>
2530

2631
<example>
@@ -45,6 +50,9 @@
4550
<li>
4651
Android documentation: <a href="https://developer.android.com/reference/android/webkit/WebSettings#setAllowUniversalAccessFromFileURLs(boolean)">WebSettings.setAllowUniversalAccessFromFileURLs</a>.
4752
</li>
53+
<li>
54+
Android documentation: <a href="https://developer.android.com/reference/androidx/webkit/WebViewAssetLoader">WebViewAssetLoader</a>.
55+
</li>
4856
</references>
4957

5058
</qhelp>

0 commit comments

Comments
 (0)