Эх сурвалжийг харах

Avoid opening blobs as webpages

Fixes #10060

(cherry picked from commit 548f7f415a28529522f5aef0d53546e8bc68957e)
arkon 1 жил өмнө
parent
commit
f8834ee764

+ 6 - 0
app/src/main/java/eu/kanade/presentation/webview/WebViewScreenContent.kt

@@ -124,6 +124,12 @@ fun WebViewScreenContent(
                     request: WebResourceRequest?,
                 ): Boolean {
                     request?.let {
+                        // Don't attempt to open blobs as webpages
+                        if (it.url.toString().startsWith("blob:http")) {
+                            return false
+                        }
+
+                        // Continue with request, but with custom headers
                         view?.loadUrl(it.url.toString(), headers)
                     }
                     return super.shouldOverrideUrlLoading(view, request)