Closed
Bug 815769
Opened 12 years ago
Closed 12 years ago
Only require an https payment provider if the dom setting says to
Categories
(Core :: DOM: Device Interfaces, defect)
Core
DOM: Device Interfaces
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: kumar, Assigned: ferjm)
Details
Attachments
(1 file)
3.05 KB,
patch
|
fabrice
:
review+
lsblakk
:
approval-mozilla-aurora+
lsblakk
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
navigator.mozPay() (bug 767818) currently restricts all payment providers to only those having https URLs [1]. This makes B2G development difficult against a localhost payment provider and thus shortens the feedback cycle when building features. Let's introduce a dom setting to toggle the https check on/off. Something like dom.payment.provider.requireHttps = true ? This pref would be for devs only. [1] http://mxr.mozilla.org/mozilla-central/source/dom/payment/Payment.jsm#298
Reporter | ||
Comment 1•12 years ago
|
||
s/shortens feedback cycle/delays feedback cycle/g :)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → ferjmoreno
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #687854 -
Flags: review?(fabrice)
Comment 3•12 years ago
|
||
Comment on attachment 687854 [details] [diff] [review] v1 Review of attachment 687854 [details] [diff] [review]: ----------------------------------------------------------------- r=me with comments addressed ::: dom/payment/Payment.jsm @@ +47,5 @@ > + // We first check if the preference actually exists, so we don't get an > + // NS_ERROR_UNEXPECTED error. > + if (paymentPrefs.getPrefType("skipHTTPSCheck")) { > + this.checkHttps = !paymentPrefs.getBoolPref("skipHTTPSCheck"); > + } Usually we do it that way: let value = defaultValue; try { value = prefBranch.getBoolPref("the.pref.name"); } catch(e) {} @@ +307,5 @@ > } > > // We only allow https for payment providers uris. > + if (this.checkHttps) { > + if (!/^https/.exec(provider.uri.toLowerCase())) { nit: if (this.checkHttps && !/.../) { }
Attachment #687854 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 4•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/8f0067ac46f1
Assignee | ||
Comment 5•12 years ago
|
||
Comment on attachment 687854 [details] [diff] [review] v1 [Approval Request Comment] Bug caused by (feature/regressing bug #): - User impact if declined: Based on comment 0, no user impact, but developer impact Testing completed (on m-c, etc.): Local tests. Risk to taking this patch (and alternatives if risky): B2G only feature, and well tested locally, so very low risk. String or UUID changes made by this patch: None.
Attachment #687854 -
Flags: approval-mozilla-beta?
Attachment #687854 -
Flags: approval-mozilla-aurora?
Comment 6•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8f0067ac46f1
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Reporter | ||
Comment 7•12 years ago
|
||
Thanks ferjm! This is going to tremendously speed up development time on the frontend payments UI.
Comment 8•12 years ago
|
||
Comment on attachment 687854 [details] [diff] [review] v1 developer feature, doesn't appear to impact users on desktop/mobile, so approving for uplift.
Attachment #687854 -
Flags: approval-mozilla-beta?
Attachment #687854 -
Flags: approval-mozilla-beta+
Attachment #687854 -
Flags: approval-mozilla-aurora?
Attachment #687854 -
Flags: approval-mozilla-aurora+
Comment 9•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/e1fb7dbde5f6 https://hg.mozilla.org/releases/mozilla-beta/rev/9fb7a7653209
You need to log in
before you can comment on or make changes to this bug.
Description
•