Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,13 @@ class VectorWebViewActivity : VectorBaseActivity<ActivityVectorWebViewBinding>()
// Allow use of Local Storage
domStorageEnabled = true

@Suppress("DEPRECATION")
allowFileAccessFromFileURLs = true
@Suppress("DEPRECATION")
allowUniversalAccessFromFileURLs = true
// allowFileAccessFromFileURLs and allowUniversalAccessFromFileURLs
// only take effect when the main frame is a file:// URL. This
// WebView is launched with an http/https URL (see EXTRA_URL
// wiring), so neither flag is load-bearing here, and
// allowUniversalAccessFromFileURLs in particular is a
// CWE-200 sandbox-escape vector if a file:// load ever lands
// in this Activity.

displayZoomControls = false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ fun WebView.setupForWidget(activity: Activity,
// Allow use of Local Storage
settings.domStorageEnabled = true

@Suppress("DEPRECATION")
settings.allowFileAccessFromFileURLs = true
@Suppress("DEPRECATION")
settings.allowUniversalAccessFromFileURLs = true
// allowFileAccessFromFileURLs and allowUniversalAccessFromFileURLs
// only take effect when the main frame is a file:// URL. Widgets are
// always served from an https widget URL, so neither flag is
// load-bearing here, and allowUniversalAccessFromFileURLs in
// particular is a CWE-200 sandbox-escape vector.

settings.displayZoomControls = false

Expand Down