elixir-plug / plug

Compose web applications with functions
https://hex.pm/packages/plug
Other
2.88k stars 587 forks source link

Add option to decide what to do on invalid UTF-8 urlencoded params #1159 #1192

Closed bradhanks closed 11 months ago

bradhanks commented 1 year ago

I added the ability to set any status code when utf8 validation fails. It's somewhat related to the issue #1159.

I'm expecting that nothing will be useable as is, but I'm happy to make edits.

What I lack in exp, I make up in enthusiasm?

josevalim commented 1 year ago

Hi @bradhanks ! The change should be smaller than here. Inside the validate_utf8! function, you can call Application.get_env and read the status code we are meant to use. :)

bradhanks commented 11 months ago

Sorry I did not mean to close this. I have it done I think. I'm just writing some tests.

bradhanks commented 11 months ago

Created new PR https://github.com/elixir-plug/plug/pull/1200