New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 750470 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

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.
 
Labels: Needs-Milestone
Components: -Blink Blink>MediaStream
Components: -Blink>MediaStream UI>Browser>Permissions
Cc: timloh@chromium.org
Owner: raymes@chromium.org
Status: Assigned (was: Unconfirmed)
Raymes / Tim, can you look into this?
Repro attached...
extension.tar.gz
593 bytes Download
Cc: msramek@chromium.org
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.
Cc: raymes@chromium.org
Owner: timloh@chromium.org
> 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".


Labels: OS-Chrome OS-Linux OS-Windows
Status: Started (was: Assigned)
Project Member

Comment 10 by bugdroid1@chromium.org, 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

Labels: -Needs-Milestone M-63
Status: Fixed (was: Started)
Should be fixed (not in the latest canary yet, but will be in the next one)
Thanks:)

Sign in to add a comment