Closed Bug 1096732 Opened 10 years ago Closed 10 years ago

(ios) Work around NSURLCredential caching issues

Categories

(Firefox for iOS :: Firefox Accounts, defect)

All
iOS 7
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: bnicholson, Assigned: bnicholson)

References

Details

NSURLConnection uses cached TLS sessions after the initial authentication challenge (https://developer.apple.com/library/ios/qa/qa1727/_index.html). We need to figure out a workaround to support logging out.
It is really stupid that we have no control over that cache. Here is an equally stupid workaround .. :-)

The API now responds to both:

    https://moz-syncapi.sateh.com/1.0/clients
    https://moz-syncapi-*.sateh.com/1.0/clients

So to work around that TLS cache bug, I would suggest to put the username part of the email address in the url. So when sarentz+test@mozilla.com logs in, use this as the API endpoint:

    https://moz-syncapi-sarentz.sateh.com/1.0/clients

Just make sure that you keep the wildcard part of the URL ASCII only and just [a-z0-9-]

Not super happy with this but this is just temporary until we can stop using the REST API anyway.
Thanks for the quick fix! I'll update the login handling accordingly.
Assignee: nobody → bnicholson
We're OK with just requiring people to restart the app for now. The REST API is a temporary solution anyway, so no need to put in extra effort here.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Group: mozilla-employee-confidential
Component: General → Firefox Accounts
Product: Firefox for Android → Firefox for iOS
You need to log in before you can comment on or make changes to this bug.