gree / unity-webview

zlib License
2.23k stars 684 forks source link

The app enables dangerous file access via setAllowUniversalAccessFromFileURLs #1043

Open SachinTichkule opened 5 months ago

SachinTichkule commented 5 months ago

net.gree.unitywebview.CWebViewPlugin$4 Line 738 in net/gree/unitywebview/

SachinTichkule commented 5 months ago

Use androidx#webkit#WebViewAssetLoader to load file content securely.

KojiNakamaru commented 5 months ago

Yes, that part was originally introduced with trusted origins in mind and should be fixed in the future. If you need to avoid it immediately, you can modify the code and build your custom plugin. cf. https://github.com/gree/unity-webview/tree/ffe3a1748959175ce0f8fa448191cb2738fbc1e0#how-to-build-webviewplugin-aartmpl