Bizarre chrome://settings/content/microphone bug
Reported by
rglee...@londontrustmedia.com,
Jul 30 2017
|
||||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Example URL:
Steps to reproduce the problem:
1.
Visit chrome://settings/content/microphone, confirm the default is "Ask".
2.
Load an extension that will block access to your microphone on "<all_urls>" primaryPattern, eg:
chrome.contentSettings.microphone.set({setting: "block", scope: "regular", primaryPattern: "<all_urls>"}).
3.
with the extension loaded and the above content setting rule applied, visit chrome://settings/content/microphone again. You should see the default rule is "Blocked" and that an extension is controlling the setting. All good.
4.
Call chrome.contentSettings.microphone.clear({scope: "regular"}).
5.
Visit chrome://settings/content/microphone again.
6.
Observe that the extension is no longer controlling the setting, but the default has been changed to "Block" ! (from "Ask"). Step 3 is what causes this to happen.
What is the expected behavior?
Expected behaviour is while visiting a content setting page such as chrome://settings/content/microphone with an extension blocking access on "<all_urls>", the global browser default should not be changed to "Blocked" once an extension releases control using clear(). It should be restored to "Ask" or the users prior default.
What went wrong?
Explained in step 6 of reproduction steps.
Does it occur on multiple sites: Yes
Is it a problem with a plugin? No
Did this work before? N/A
Does this work in other browsers? Yes
Chrome version: 59.0.3071.115 Channel: stable
OS Version: OS X 10.11.6
Flash Version:
Bizarre bug that took me a while to hunt down. I can see extension authors taking flake or blame for this bug from end-users of extensions.
,
Jul 31 2017
,
Aug 2 2017
,
Aug 2 2017
Raymes / Tim, can you look into this?
,
Aug 2 2017
Repro attached...
,
Aug 3 2017
Interesting, even after uninstalling it still happens. timloh are you able to investigate? (sorry I would take this one but I'm running out of time :(). msramek@ may also have ideas.
,
Aug 3 2017
,
Aug 3 2017
> Interesting, even after uninstalling it still happens. Yeah, it appears as though visiting chrome://settings/content/microphone is somehow changing the default permission to "Block". Once clear() is called and even the extension uninstalled, the default remains at "Block".
,
Aug 7 2017
,
Sep 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c459c0ea74f6a86c0fd26b2ac2dfb189a56ac6e5 commit c459c0ea74f6a86c0fd26b2ac2dfb189a56ac6e5 Author: Timothy Loh <timloh@chromium.org> Date: Thu Sep 07 09:27:43 2017 Don't override global default content setting with extension-enforced default. This patch fixes a bug where visiting the content settings page for a specific type (e.g. chrome://settings/content/microphone) will override the global default with an extension-enforced default if one exists. During page set-up we set the permission control to the current default state, and onChangePermissionControl_ observes this change and treats it as a user action, storing the value it was set to. This is fine for a default that was user-set, but for an extension-enforced default this can end up overriding the actual user default. Bug: 750470 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: Ia7ba8cc08abcbba10b11870b771b41e571560bd6 Reviewed-on: https://chromium-review.googlesource.com/602840 Reviewed-by: Dave Schuyler <dschuyler@chromium.org> Commit-Queue: Timothy Loh <timloh@chromium.org> Cr-Commit-Position: refs/heads/master@{#500255} [modify] https://crrev.com/c459c0ea74f6a86c0fd26b2ac2dfb189a56ac6e5/chrome/browser/resources/settings/site_settings/category_default_setting.js [modify] https://crrev.com/c459c0ea74f6a86c0fd26b2ac2dfb189a56ac6e5/chrome/test/data/webui/settings/category_default_setting_tests.js
,
Sep 8 2017
Should be fixed (not in the latest canary yet, but will be in the next one)
,
Sep 8 2017
Thanks:) |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by nyerramilli@chromium.org
, Jul 31 2017