You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've seen a few instances of this happening on a production server. Now that I've investigated this further, I think the root of the problem is that Rack is not correctly parsing some headers containing unicode characters. This means that some of the header text is "leaking" out into the request body. Rack then tries to interpret this body text as form fields which (in the case I have seen) results in a single hash "key" containing what look like unicode characters. If some of the bytes are the null character, then vanilla raises an ArgumentError (see below) when trying to convert [1] the "key" to a symbol (at least in Ruby 1.8.7). I believe the error is due to this line of Ruby C code [2]. It's obvious that the real problem does not lie within vanilla, but I do wonder whether it's worth making vanilla more robust to keys that cannot be converted to symbols. In any case I'll pursue the root case of the problem with the Rack project.
ArgumentError occured: symbol string may not contain `\0'
I've seen a few instances of this happening on a production server. Now that I've investigated this further, I think the root of the problem is that Rack is not correctly parsing some headers containing unicode characters. This means that some of the header text is "leaking" out into the request body. Rack then tries to interpret this body text as form fields which (in the case I have seen) results in a single hash "key" containing what look like unicode characters. If some of the bytes are the null character, then vanilla raises an
ArgumentError
(see below) when trying to convert [1] the "key" to a symbol (at least in Ruby 1.8.7). I believe the error is due to this line of Ruby C code [2]. It's obvious that the real problem does not lie within vanilla, but I do wonder whether it's worth making vanilla more robust to keys that cannot be converted to symbols. In any case I'll pursue the root case of the problem with the Rack project.[1] https://github.com/lazyatom/vanilla-rb/blob/master/lib/vanilla/request.rb#L19
[2] https://github.com/ruby/ruby/blob/v1_8_7/string.c#L4530
The text was updated successfully, but these errors were encountered: