-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
brave scheme is loaded from js #2777
Comments
Chrome scheme is added to not allowing list by below.
When comments out above registering for chrome scheme, chrome scheme page wasn't loaded. |
Need to know navigation code path(browser-initiated, renderer-initiated) to find good solution.
|
With Plz navigation, all navigations are managed by browser process.Also there are two kinds of navigations. Below is the case of renderer-initiated navigation
Below is the case of browser-initiated navigation
Although chromium's navigation code path is quite complext, I found good point to distinguish To prevent brave scheme loading from different origin, we should handle it from browser and rendere both. When chrome url is initiated from renderer, its loading is blocked in renderer process. That means current mapping can't prevent renderer initiated brave scheme navigation. If we want to handle like chrome scheme, renderer should prevent brave
With above registration, In case of browser initiated navigation, current mapping works well because mapping is done before the start of navigation. In the browser process, it also has filtering policy to check renderer requests like open url.
Remained issues
Fixing ideas
|
just noting there is a related proof-of-concept which should be fixed by this:
|
@diracdeltas Yep, above one also fixed by #2861 |
browser-initiated navigation path
|
kChromeUIScheme in content layer/Users/simon/Projects/brave/brave-browser/src/content/browser/browser_url_handler_impl.cc /Users/simon/Projects/brave/brave-browser/src/content/browser/code_cache/generated_code_cache.cc /Users/simon/Projects/brave/brave-browser/src/content/browser/download/download_manager_impl.cc /Users/simon/Projects/brave/brave-browser/src/content/browser/frame_host/debug_urls.cc /Users/simon/Projects/brave/brave-browser/src/content/browser/frame_host/webui_navigation_throttle.cc /Users/simon/Projects/brave/brave-browser/src/content/browser/net/view_blob_internals_job_factory.cc /Users/simon/Projects/brave/brave-browser/src/content/browser/renderer_host/code_cache_host_impl.cc /Users/simon/Projects/brave/brave-browser/src/content/browser/site_instance_impl.cc /Users/simon/Projects/brave/brave-browser/src/content/browser/webrtc/webrtc_internals_message_handler.cc /Users/simon/Projects/brave/brave-browser/src/content/browser/webui/content_web_ui_controller_factory.cc /Users/simon/Projects/brave/brave-browser/src/content/browser/webui/shared_resources_data_source.cc /Users/simon/Projects/brave/brave-browser/src/content/browser/webui/url_data_manager_backend.cc /Users/simon/Projects/brave/brave-browser/src/content/common/url_schemes.cc /Users/simon/Projects/brave/brave-browser/src/content/public/browser/url_data_source.cc /Users/simon/Projects/brave/brave-browser/src/content/public/common/url_constants.cc /Users/simon/Projects/brave/brave-browser/src/content/public/common/url_utils.cc /Users/simon/Projects/brave/brave-browser/src/content/renderer/web_ui_extension.cc |
Documents about current navigation path - PlzNavigation |
Hey @simonhong — is this fixed or is there still more work left to do? |
@tomlowenthal Hello, this issue is the same as #2631, which I reported in HackerOne. This can be closed! :) |
@tomlowenthal Yes, this is fixed. |
Description
brave scheme should be blocked from js. (Not allowed to load local resources)
With below code by @bbondy , our settings page is loaded.
This loading should be blocked.
Steps to Reproduce
Actual result:
brave settings page is loaded
Expected result:
settings page should not be loaded
Reproduces how often:
Brave version (brave://version info)
Version 0.61.0 Chromium: 72.0.3626.28 (Official Build) (64-bit)
Reproducible on current release:
yes
Website problems only:
Additional Information
The text was updated successfully, but these errors were encountered: