From: nobu@... Date: 2019-02-04T12:19:35+00:00 Subject: [ruby-core:91391] [Ruby trunk Bug#15584] JSON parse error message too long, looks like a crash Issue #15584 has been updated by nobu (Nobuyoshi Nakada). Status changed from Open to Rejected Please report an issue of JSON to its upstream, and it seems fixed already. ---------------------------------------- Bug #15584: JSON parse error message too long, looks like a crash https://bugs.ruby-lang.org/issues/15584#change-76648 * Author: cwardata (cw data) * Status: Rejected * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin14] ` * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- When trying to parse text into JSON, parsing this specific input fills up my terminal with the content of the unzipped data. I then can't see what the error message is and it looks very much like a crash. I think there should be some limit on the number of characters from the failed parsed input. ``` require 'open-uri'; require 'base64'; require 'json'; s = open('https://gist.githubusercontent.com/cwardata/ae8d0a408fef1b1c0c7005e6b3b53769/raw/c87e639caaa0d3eb412dbe950281a37edd174cdc/gzip-crash-testcase.txt').read; JSON.parse(Zlib::GzipReader.new(StringIO.new(Base64.decode64(s))).readlines.join); nil ``` -- https://bugs.ruby-lang.org/ Unsubscribe: