UITour: Add preference to disable HTTPS check for testing/development

RESOLVED FIXED in Firefox 28

Status

()

Firefox
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Unfocused, Assigned: Unfocused)

Tracking

unspecified
Firefox 28
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

As part of the security check, UITour.jsm requires the age to be served over HTTPS. Think this might be a bit too painful for testing/development, so lets add a hidden pref to disable that.
Hi, is there any scope to have this done before 11th Nov? 

Would be great to have the override pref available for our upcoming work week.
Yep, just about to put up a patch now. Sorry if this held you up at all.
Assignee: nobody → bmcbride
Status: NEW → ASSIGNED
Created attachment 827072 [details] [diff] [review]
Patch v1
Attachment #827072 - Flags: review?(MattN+bmo)
Comment on attachment 827072 [details] [diff] [review]
Patch v1

Review of attachment 827072 [details] [diff] [review]:
-----------------------------------------------------------------

I personally don't think setting up HTTPS is that big of a deal to deserve its own preference but okay.

::: browser/modules/UITour.jsm
@@ -254,5 @@
>  
>      if (uri.schemeIs("chrome"))
>        return true;
>  
> -    if (!uri.schemeIs("https"))

Why the Set stuff and not just:
if (!uri.schemeIs("https") && Services.prefs.getBoolPref("….requireSecure"))
  return false;
Attachment #827072 - Flags: review?(MattN+bmo) → review+
(In reply to Matthew N. [:MattN] (catching up on reviews) from comment #4)
> I personally don't think setting up HTTPS is that big of a deal to deserve
> its own preference but okay.

Turns out it's a pain to do with bedrock :\ Gotta use something to proxy HTTPS to it.


> Why the Set stuff and not just:
> if (!uri.schemeIs("https") && Services.prefs.getBoolPref("….requireSecure"))
>   return false;

I wanted to be more explicit about what schemes we allow, rather than just allowing everything. And the likes of file: and data: URIs don't work with the permissions manager anyway, so this makes it more obvious what's going on. And checking for https and optionally http ended up making it harder to read than using Set.
https://hg.mozilla.org/integration/fx-team/rev/cf627f856f18

Alex: Once this hits Nightly, you'll be able to flip the browser.uitour.requireSecure preference.
(In reply to Blair McBride [:Unfocused] from comment #6)
> Alex: Once this hits Nightly, you'll be able to flip the
> browser.uitour.requireSecure preference.

Thanks for your work on this, Blair - sounds good!
https://hg.mozilla.org/mozilla-central/rev/cf627f856f18
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 28

Updated

4 years ago
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.