Closed Bug 1279540 Opened 10 years ago Closed 10 years ago

Can't login to Marketplace on FxOS 1.3

Categories

(Cloud Services :: Server: Firefox Accounts, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: eviljeff, Unassigned)

References

()

Details

Trying to login to Marketplace (either via consumer pages or devhub) results in a 500 error. This is only occurring on FirefoxOS 1.3 - works fine on 2.0, 2.5 and desktop Firefox. The actual error appears to be on the FxA domain rather than Marketplace so the offending code may not reside in zamboni/fireplace.
I can dig in on the FxA side if anyone can point me in the right direction. Does this login involve a web-based flow, or is it directly via the FxA integration on the device?
Flags: needinfo?(awilliamson)
iirc its the web based flow on 1.3 - though I've not got a suitable device with me currently so I can't confirm. Sometimes, in the absence of a 1.3 device, its possible to replicate 1.3 errors with a desktop version of Firefox using the same gecko (28).
Flags: needinfo?(awilliamson)
I was able to reproduce this in the FirefoxOS 1.3 simulator as follows: * From latest desktop Firefox, choose Tools -> Web Developer -> Web IDE * Install and launch the "Firefox OS 1.3" simulator * Open browser, visit https://marketplace.firefox.com, and attempt to sign in * Result -> "unexpected error"
By contrast, marketplace login worked fine for me on desktop firefox v28.
Also TBH, given that this is a very old version of FirefoxOS, it's not obvious to me how much we should prioritize the investigation and potential fix here, especially since it's working in newer versions.
Technically, we (marketplace, anyway) support back to and including 1.3 (which is a significant percentage of our user base).
:ddurst, that's helpful to know, thanks :-)
Component: Integration → Server: Firefox Accounts
Product: Marketplace → Cloud Services
Version: Avenir → other
/cc :stomlinson, in case he's seen this before.
Per [1] this appears to be a CSP-related error: """ Content Security Policy: The page's settings blocked the loading of a resource at https://api.accounts.firefox.com/v1/account/login ("default-src https://accounts.firefox.com:443").(unknown) """ [1] https://github.com/mozilla/fxa-bugzilla-mirror/issues/163#issuecomment-233442237
:vladikoff dug in and saw this is because a CSP error is being thrown when connecting to api.accounts.firefox.com. Some good info from MDN[1]: > Note: Prior to Firefox 23, xhr-src was used in place of the connect-src directive and only restricted the use of XMLHttpRequest. I believe FxOS 1.3 is based on Gecko 18, so this makes sense. :rfkelly and I discussed possible mitigations today, we could either add an xhr-src for FxOS, though I'm not sure how to make our middleware do this, or we can add https://api.accounts.firefox.com to the default-src declaration universally. We are going with the latter for now. [1] - https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives#connect-src
A patch has landed in the content server [1] to send the xhr-src CSP declaration. connect-src was not recognized on FxOS until the CSP 1.0 parser landed in FxOS 2.0. Previous to that, xhr-src provided the same functionality. This should make its way to prod in ~ 2 weeks time. [1] - https://github.com/mozilla/fxa-content-server/pull/3940
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.