xentek / hyperdrive

hypermedia state machine
https://rubygems.org/gems/hyperdrive
MIT License
5 stars 0 forks source link

Convert string params to UTF-8 #32

Open xentek opened 9 years ago

xentek commented 9 years ago

When strings are copy+pasted from weird sources like Office Documents, the string encoding will sometimes be ASCII-8BIT and causes 500 errors when endpoints try to process them. We should be able to fix this by converting values of params to UTF-8 strings in a new rack middleware that runs early in the chain (e.g. right after we remove non-whitelisted params)

jpark3000 commented 9 years ago

Pull up for this issue https://github.com/styleseek/hyperdrive/pull/33

Zaidos commented 9 years ago

Can this be closed now that pull request #33 has been merged?

jpark3000 commented 9 years ago

Not sure if this has been tested at an integration level against the original problem that prompted this change, copying and pasting strings from weird sources like Office Documents. Probably want to do that before closing it.

xentek commented 9 years ago

Yeah, it seemed to address some things but not all. Merging in the branch did fix another bug that was in that version, but some of the copy+pasting stuff is still outstanding. Thanks @jpark3000