[#94657] [Ruby master Feature#16131] Remove $SAFE, taint and trust — naruse@...
Issue #16131 has been reported by naruse (Yui NARUSE).
3 messages
2019/08/29
[ruby-core:94121] [Ruby master Bug#6566] JSON.dump can generate invalid UTF-8 sequence
From:
merch-redmine@...
Date:
2019-08-03 00:01:45 UTC
List:
ruby-core #94121
Issue #6566 has been updated by jeremyevans0 (Jeremy Evans).
Status changed from Assigned to Closed
I think this was fixed upstream last year: https://github.com/flori/json/commit/91a24ecac3d722bc3e545fdd0657ed225e91c2df
----------------------------------------
Bug #6566: JSON.dump can generate invalid UTF-8 sequence
https://bugs.ruby-lang.org/issues/6566#change-80369
* Author: shyouhei (Shyouhei Urabe)
* Status: Closed
* Priority: Normal
* Assignee: naruse (Yui NARUSE)
* Target version:
* ruby -v: ruby 2.0.0dev (2012-06-09) [x86_64-linux]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
=begin
Look, in the following code JSON.dump outputs a sequence invalid as UTF-8.
# -*- encoding: utf-8 -*-
require 'json'
IO.popen('hexdump -C', 'w') do |fp|
JSON.dump(["\xea"], fp)
end
RFC4627 says that to encode JSON as a Unicode is a "SHALL". So this is an RFC violation.
=end
---Files--------------------------------
bug-6566.diff (1.62 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>