Skip to content

App crash: Canceling Twitter authentication makes application to Crash #1566

Closed
@dsp1589

Description

@dsp1589

[Similar Issue : Twitter login cancellation crashes app #1474]

Application crashes when user tries to cancel the twitter authentication flow by tapping cancel button(not X in top right corner of the dialog) in twitter web page.

When user cancels the authentication twitter redirects the app to successcallback with query parameter "denied". But Parse have the logic to check the prefix of the url is success or not and no inspecting of query params which led to success callback with user name from twitter as 'nil'. nil user name is tried to insert into nsdictionary crashes the app. (see this comment : #1474 (comment))

In the file : PFOAuth1FlowDialog.m

NSURL *url = navigationAction.request.URL; BOOL hasPrefix = [url.absoluteString hasPrefix:self.redirectURLPrefix]; if (hasPrefix) { [self _dismissWithSuccess:YES url:url error:nil];

Example redirection url from twitter:

Denied Status:
http://twitter-oauth.anydomain/?denied=EgIE9gAAAAAAuhSSAAABdVPiNbM

Success Status:
http://twitter-oauth.anydomain/?oauth_token=TOKEN_VALUE&oauth_verifier=ALPHA_NUMERIC_STRING

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions