Skip to content

+[NSURL gh_queryStringToDictionary:] crashes when passed an incorrectly encoded string #6

@bmelts

Description

@bmelts

+[NSURL gh_decode] assumes UTF-8 urlencoding - if used with a differently encoded URL (e.g. Latin-1) it crashes hard.

I was unsure about the right course of action here, though - raise an exception, ignore the broken entry entirely, or (if it's the value that's busted) use an NSNull instead?

(Also, does gh_decode do anything that -[NSString stringByReplacingPercentEscapesUsingEncoding:] doesn't?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions