-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Use localhost-permission-allow-list.txt to decide which websites to prompt for #30121
Comments
@brave/qa-team this one can be completed at the same alongside #30151. |
Verification
|
Brave | 1.53.76 Chromium: 114.0.5735.90 (Official Build) beta (64-bit) |
---|---|
Revision | 386bc09e8f4f2e025eddae123f36f6263096ae49-refs/branch-heads/5735@{#1052} |
OS | Windows 10 Version 22H2 (Build 19045.3031) |
Shared Steps:
- installed
1.53.76
- launched Brave
- set
brave://flags/#brave-localhost-access-permission
toEnabled
- clicked
Relaunch
- added the following:
# https://shivankaul.com/brave/localhost/
shivankaul.com
- to
localhost-permission-allow-list.txt
inC:\Users\steph\AppData\Local\BraveSoftware\Brave-Browser-Beta\User Data\afalakplffnnnlkncjhbmahjfjhmlkal\1.0.342\1
- created a
tests
dir on my desktop - placed a
logo.png
file in the same directory - ran
python3 -m http.server 8000
, also fromtests
example | example | example |
---|---|---|
Subresource test - PASSED
(continued from Shared Steps
)
- added
@@||localhost^$domain=shivankaul.com
toCreate custom filters
inbrave://settings/shields/filters
- loaded
https://shivankaul.com/brave/localhost/subresource.html
- confirmed I was prompted to
Allow
orBlock
- clicked
Allow
- confirmed my
logo.png
loaded - confirmed
https://shivankaul.com:443
appeared underAllowed to access localhost resources
, inbrave://settings/content/localhostAccess
- repeated, this time clicking
Block
- confirmed
logo.png
showed a broken-image placeholder - confirmed
https://shivankaul.com:443
appeared underNot allowed to access localhost resources
inbrave://settings/content/localhostAccess
Custom filter rule |
localhost-permission prompt |
Allow ed |
Block ed |
Allowed to access... |
Not allowed to access... |
---|---|---|---|---|---|
iframe test - PASSED
(continued from Shared Steps
)
- loaded
https://shivankaul.com/brave/localhost/iframe.html
- confirmed I was prompted to
Allow
orBlock
- clicked
Allow
- confirmed my
logo.png
loaded - confirmed
https://shivankaul.com:443
appeared underAllowed to access localhost resources
, inbrave://settings/content/localhostAccess
- repeated, this time clicking
Block
- confirmed
logo.png
showed a broken-image placeholder - confirmed
https://shivankaul.com:443
appeared underNot allowed to access localhost resources
inbrave://settings/content/localhostAccess
Custom filter rule |
localhost-permission prompt |
Allow ed |
Redirect |
Block ed |
Allowed to access... |
Not allowed to access... |
---|---|---|---|---|---|---|
localhostAccess-priority test - PASSED
(continued from Shared Steps
)
Allowed
test case
- added
shivankaul.com
toAllowed to access localhost resources
, inbrave://settings/content/localhostAccess
- loaded
https://shivankaul.com/brave/localhost/subresource.html
- confirmed no localhost-permissions prompt dialog
Confirmed logo.png
rendered
example | example |
---|---|
Not allowed
test case
- added
shivankaul.com
toNot allowed to access localhost resources
inbrave://settings/content/localhostAccess
- loaded
https://shivankaul.com/brave/localhost/subresource.html
- confirmed no localhost-permissions prompt dialog
Confirmed logo.png
didn't render; only a broken-image icon, in its place
example | example |
---|---|
Verification
|
Brave | 1.53.81 Chromium: 114.0.5735.90 (Official Build) beta (x86_64) |
---|---|
Revision | 386bc09e8f4f2e025eddae123f36f6263096ae49-refs/branch-heads/5735@{#1052} |
OS | macOS Version 11.7.7 (Build 20G1345) |
Shared Steps:
- installed
1.53.81
- launched Brave
- set
brave://flags/#brave-localhost-access-permission
toEnabled
- clicked
Relaunch
- added the following:
# https://shivankaul.com/brave/localhost/
shivankaul.com
- to
localhost-permission-allow-list.txt
in/Users/stephendonner/Library/Application Support/BraveSoftware/Brave-Browser-Beta/afalakplffnnnlkncjhbmahjfjhmlkal/1.0.344/1
- created a
tests
dir on my desktop - placed a
logo.png
file in the same directory - ran
python3 -m http.server 8000
, also fromtests
brave://flags |
localhost-permission-allow-list |
python3 -m http.server 8000 |
---|---|---|
Subresource test - PASSED
(continued from Shared Steps
)
- added
@@||localhost^$domain=shivankaul.com
toCreate custom filters
inbrave://settings/shields/filters
- loaded
https://shivankaul.com/brave/localhost/subresource.html
- confirmed I was prompted to
Allow
orBlock
- clicked
Allow
- confirmed my
logo.png
loaded - confirmed
https://shivankaul.com:443
appeared underAllowed to access localhost resources
, inbrave://settings/content/localhostAccess
- repeated, this time clicking
Block
- confirmed
logo.png
showed a broken-image placeholder - confirmed
https://shivankaul.com:443
appeared underNot allowed to access localhost resources
inbrave://settings/content/localhostAccess
Custom filter rule |
localhost-permission prompt |
Allow ed |
Block ed |
Allowed to access... |
Not allowed to access... |
---|---|---|---|---|---|
iframe test - PASSED
(continued from Shared Steps
)
- loaded
https://shivankaul.com/brave/localhost/iframe.html
- confirmed I was prompted to
Allow
orBlock
- clicked
Allow
- confirmed my
logo.png
loaded - confirmed
https://shivankaul.com:443
appeared underAllowed to access localhost resources
, inbrave://settings/content/localhostAccess
- repeated, this time clicking
Block
- confirmed
logo.png
showed a broken-image placeholder - confirmed
https://shivankaul.com:443
appeared underNot allowed to access localhost resources
inbrave://settings/content/localhostAccess
Custom filter rule |
localhost-permission prompt |
Allow ed |
Redirect |
Block ed |
Allowed to access... |
Not allowed to access... |
---|---|---|---|---|---|---|
localhostAccess-priority test - PASSED
(continued from Shared Steps
)
Allowed
test case
- added
shivankaul.com
toAllowed to access localhost resources
, inbrave://settings/content/localhostAccess
- loaded
https://shivankaul.com/brave/localhost/subresource.html
- confirmed no localhost-permissions prompt dialog
Confirmed logo.png
rendered
example | example |
---|---|
Not allowed
test case
- added
shivankaul.com
toNot allowed to access localhost resources
inbrave://settings/content/localhostAccess
- loaded
https://shivankaul.com/brave/localhost/subresource.html
- confirmed no localhost-permissions prompt dialog
Confirmed logo.png
didn't render; only a broken-image icon, in its place
example | example |
---|---|
Verification
Shared Steps:
Subresource test -
|
Custom filter rule |
localhost-permission prompt |
Allow ed |
Block ed |
Allowed to access... |
Not allowed to access... |
---|---|---|---|---|---|
iframe test - PASSED
(continued from Shared Steps
)
- loaded
https://shivankaul.com/brave/localhost/iframe.html
- confirmed I was prompted to
Allow
orBlock
- clicked
Allow
- confirmed my
logo.png
loaded - confirmed
https://shivankaul.com:443
appeared underAllowed to access localhost resources
, inbrave://settings/content/localhostAccess
- repeated, this time clicking
Block
- confirmed
logo.png
showed a broken-image placeholder - confirmed
https://shivankaul.com:443
appeared underNot allowed to access localhost resources
inbrave://settings/content/localhostAccess
Custom filter rule |
localhost-permission prompt |
Allow ed |
Redirect |
Block ed |
Allowed to access... |
Not allowed to access... |
---|---|---|---|---|---|---|
localhostAccess-priority test - PASSED
(continued from Shared Steps
)
Allowed
test case
- added
shivankaul.com
toAllowed to access localhost resources
, inbrave://settings/content/localhostAccess
- loaded
https://shivankaul.com/brave/localhost/subresource.html
- confirmed no localhost-permissions prompt dialog
Confirmed logo.png
rendered
example | example |
---|---|
Not allowed
test case
- added
shivankaul.com
toNot allowed to access localhost resources
inbrave://settings/content/localhostAccess
- loaded
https://shivankaul.com/brave/localhost/subresource.html
- confirmed no localhost-permissions prompt dialog
Confirmed logo.png
didn't render; only a broken-image icon, in its place
example | example |
---|---|
Disable the setting Sites can request access to localhost resources
- PASSED
(continued from Shared Steps
)
- toggle OFF
Sites can request access to localhost resources
inbrave://settings/content/localhostAccess
- load https://shivankaul.com/brave/localhost/subresource.html
Confirmed no localhost-permissions prompt dialog
Confirmed logo.png
didn't render; only a broken-image icon, in its place
example | example |
---|---|
Verified on
Filed issue #31683STEPS:
ACTUAL RESULTS:
|
If localhost permission is not already given, only prompt if requesting URL is on allowlist which will be shipped as a component update.
localhost-permission-allow-list.txt
will be bundled inBrave Local Data Updater
similar todebounce.json
orhttps-exceptions-list.txt
. PR: Package localhost-permission-allow-list.txt brave-core-crx-packager#620If a user goes into brave://settings/content/localhostAccess and adds a website to Allow or Deny we should honour that first.
The text was updated successfully, but these errors were encountered: