This project is archived and is in readonly mode.

Changeset [a9002056761a481589852d6e8680f752a5b823b7] by Dwayne Litzenberger

December 23rd, 2009 @ 07:46 PM

Fix ActiveSupport::JSON encoding of control characters [\x00-\x1f]

According to RFC 4627, only the following Unicode code points are
allowed unescaped in JSON:

unescaped = %x20-21 / %x23-5B / %x5D-10FFFF

However, ActiveSupport::JSON did not escape the range %x00-1f. This caused
parse errors when trying to decode the resulting output.

[#3345 state:committed]

Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/a9002056761a481589852d6e8680f7...

Committed by Dwayne Litzenberger

  • M activesupport/lib/active_support/json/encoding.rb
  • M activesupport/test/json/encoding_test.rb

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>