Skip to content

Reject query parameter values with invalid encoding #500

Description

@ahx

A query string like ?search=%C3 results in having a string value with invalid encoding

"\xC3".valid_encoding? # => false

If you want to do anything with the string you will get an exception:

"\xC3".upcase # => 'String#upcase': input string invalid (ArgumentError)

Maybe the request validation should always fail (return 400) with a parameter value like that (?search=%C3). Does that make sense?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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