Skip to content

non utf-8 encoding causes POST to crash #6

@janmentzel

Description

@janmentzel

issue: there is an issue with curl crashing when posting non-utf-8 characters (e.g. german umlauts) in strings (e.g. billing_address.last_name or card_holder)
The integration tests with german umlauts proove umlauts in utf-8 work.
e.g. testWpfCreate using "address1": "Kurfürstendamm 123" in its fixture

goal: throw a Hypercharge\ValidationError if users provides a string with non-utf8 special chars

solution: check encoding with iconv when validating strings.
this would be best done in json-schema validator, adding a new param to string constraint "encoding":"utf8".

note: the crash is not as bad as it sounds. the payment/transaction would fail anyway when transmitting the data to the CC processor. better early than late.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions