-
Notifications
You must be signed in to change notification settings - Fork 888
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
Do not allow wildcard content settings entries for "shields enabled" #14031
Do not allow wildcard content settings entries for "shields enabled" #14031
Conversation
6880632
to
0cc33c2
Compare
@@ -168,6 +172,17 @@ void BravePrefProvider::MigrateShieldsSettings(bool incognito) { | |||
MigrateShieldsSettingsV2ToV3(); | |||
} | |||
|
|||
void BravePrefProvider::EnsureNoWildcardEntries() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems you also need to add one 'if' in SetWebsiteSettingInternal. You can check it by clicking on 'Reset Settings'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one if
for what? Not sure what Reset Settings has to do with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
everything seems to be working correctly, I'm not understanding what the issue is here
components/content_settings/core/browser/brave_content_settings_pref_provider_unittest.cc
Show resolved
Hide resolved
Also remove any existing entries that may mistakingly be there
174a4b3
to
4b02a84
Compare
Verified using:
Also tried the following scenario:
|
…-content-setting Do not allow wildcard content settings entries for "shields enabled"
Using the STR/Cases outlined via #14031 (comment), reproduced the original issue using Verification PASSED on
Quick check to ensure that shields settings are being retained on profiles that are not experiencing the issue
|
Also remove any existing entries that may mistakingly be there
Resolves brave/brave-browser#23214
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
Add an entry for shields down for any site
Close Brave and open Default/Preferences file
in braveShield section, change the
site.com,*
to*,*
Open and close Brave
*,*
entry for braveShield should be removedWe don't current know how that entry gets created in normal use so there is no test plan for preventing it, but the code no longer allows default entries to be added for shields