Repository navigation
Temporarily recreate implied Localhost permissions - #547
Conversation
Yeah that's unfortunately become a necessity because bad actors would otherwise just spam the request to coerce people into giving a site permissions they actually don't want to give So this is just a workaround to reinstate the behaviour of the prior CEF version until we can do proper permission management for docks and sources? |
Correct, the goal in a future OBS release is to provide a method for users to individually allow/deny these permission requests themselves, pending UX design by Warchamp. I'd like to also provide a nice UI for managing existing permissions, but as mentioned there is currently no CEF API we can pull from. |
|
LGTM I will squash the commit. |
OnShowPermissionPrompt is only called *once* when a page requests permission. If it is denied, even automatically, this code path will never be triggered again.
c397ea2 to
49c262b
Compare
Description
Allow requests to
localhostfrom non-localhost pages. This is a common method of self-hosting tools for OBS.Warning
This implementation uses
OnShowPermissionPrompt, which is only called the first time such a request is made. If it was previously denied (even silently+automatically), that denial is saved permanently.CEF does not currently provide methods to re-request or to clear/edit previously denied requests.
For the above reason, the handling of the permission prompt is only managed for the one permission, which is labelled as "Apps on device" in Chrome's Site Permissions page.
Motivation and Context
While adding
disable-features=LocalNetworkAccessCheckswould solve this, it has a wider scope of side effects than I'm comfortable with.How Has This Been Tested?
Launch a HTTPS-hosted webpage that performs a fetch request to
http://localhost:3000Windows 10.
Types of changes
Checklist: