-
Notifications
You must be signed in to change notification settings - Fork 137
Closed
Milestone
Description
Original issue is at ruby/strscan#92.
The problem manifested as an ArgumentError "invalid byte sequence in UTF-8" when trying to upload a PDF via Tomcat and jruby-rack to a simple application. Thanks to the simple reproduction by @jlahtinen I was able to narrow this down to a jruby-rack bug.
The code in jruby-rack has not been updated since JRuby 1.7, and as a result it was using some unsafe methods for concatenating bytes onto an existing string. Specifically, it called an old form of RubyString#cat that did not consider encoding or code range, and when it appended encoded or binary data onto an existing buffer it could break that buffer for any character operations.
Fix coming.
dolzenko
Metadata
Metadata
Assignees
Labels
No labels