Invalid params key encoding raises uncaught ArgumentError #610

Closed
nanaya opened this Issue Oct 7, 2013 · 3 comments

Comments

Projects
None yet
4 participants
@nanaya
Contributor

nanaya commented Oct 7, 2013

This regexp check:

name =~ %r(\A[\[\]]*([^\[\]]+)\]*)

will raise uncaught ArgumentError when name has invalid encoding. Is it the intended behavior?

Fork with relevant test.

@rkh

This comment has been minimized.

Show comment Hide comment
@rkh

rkh Oct 7, 2013

Member

We only have it it specified for rack.io, but the raw string is expected to be binary encoded.

Member

rkh commented Oct 7, 2013

We only have it it specified for rack.io, but the raw string is expected to be binary encoded.

@nanaya

This comment has been minimized.

Show comment Hide comment
@nanaya

nanaya Jan 6, 2014

Contributor

unescape function called here decodes the string to utf-8 (by default) though. And by extension, there's good chance the regexp matcher will raise exception on anything but Encoding::BINARY.

Contributor

nanaya commented Jan 6, 2014

unescape function called here decodes the string to utf-8 (by default) though. And by extension, there's good chance the regexp matcher will raise exception on anything but Encoding::BINARY.

@tenderlove

This comment has been minimized.

Show comment Hide comment
@tenderlove

tenderlove Jul 18, 2014

Member

Fixed by #713

Member

tenderlove commented Jul 18, 2014

Fixed by #713

@tenderlove tenderlove closed this Jul 18, 2014

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