Closed Bug 659087 Opened 13 years ago Closed 13 years ago

"Always Ask" defaults for geolocation and indexedDB don't work


(Firefox :: Settings UI, defect)

Not set



Firefox 7
Tracking Status
firefox6 --- fixed


(Reporter: Margaret, Assigned: Margaret)




(1 file, 1 obsolete file)

The DefaultPermissions geo and indexedDB setters check for an ALLOW value to enable these permissions, but this is wrong because enabling these permissions really just means that they aren't blocked by default. Also, in the UI there is no "allow" menuitem for these permissions, so there's no way to un-block them.
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → margaret.leibovic
Attachment #534522 - Flags: review?(
Blocks: 573176
Comment on attachment 534522 [details] [diff] [review]

Can you make the same change to the passwords case, as well? I think we also need a followup for properly using "always ask" vs. "allow" in that case, so this change should help (and be equivalent in the mean time).

Another minor thing I noticed that would be good to fix in this patch, even though it's unrelated:

> if (Services.prefs.getIntPref("network.cookie.lifetimePolicy") == this.COOKIE_DENY) {

should be:

if (Services.prefs.getIntPref("network.cookie.lifetimePolicy") == this.COOKIE_SESSION) {
Attachment #534522 - Flags: review?( → review+
Blocks: 659319
(In reply to comment #2)
> I think we also
> need a followup for properly using "always ask" vs. "allow" in that case

Filed bug 659319.
Attachment #534522 - Attachment is obsolete: true
Keywords: checkin-needed
Comment on attachment 534769 [details] [diff] [review]
patch for check-in

I didn't have the chance to land this on mozilla-central yet due to tree craziness, but I think it's a valuable fix that would be good to land on aurora sooner rather than later. Without this patch, if a user sets the default permission for geolocation or indexedDB storage to "Block" for all sites, setting it back to "Always Ask" won't work, so those features will be permanently disabled unless their corresponding prefs are manually changed in about:config.
Attachment #534769 - Flags: approval-mozilla-aurora?
Closed: 13 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 7
Attachment #534769 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Could anyone please provide some simple STR in order to completely verify this issue?
(In reply to Virgil Dicu from comment #7)
> Could anyone please provide some simple STR in order to completely verify
> this issue?

In about:permissions, try changing the geolocation or indexedDB permissions for "All Sites", then go to a website that tries to use these features, and verify that Firefox asks/blocks as expected.
Mozilla/5.0 (Windows NT 6.1; rv:7.0) Gecko/20100101 Firefox/7.0
Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20100101 Firefox/7.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0) Gecko/20100101 Firefox/7.0
Mozilla/5.0 (Windows NT 5.1; rv:7.0) Gecko/20100101 Firefox/7.0

Verified fixed on Ubuntu 11.04, Mac OS 10.6, Windows XP and Windows 7.

Checked using the following site:

Firefox acts consistent when toggling the settings in about:permissions.
You need to log in before you can comment on or make changes to this bug.