Project

General

Profile

Actions

Bug #15584

closed

JSON parse error message too long, looks like a crash

Added by cwardata (cw data) over 3 years ago. Updated over 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin14] `
[ruby-core:91389]

Description

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

Updated by nobu (Nobuyoshi Nakada) over 3 years ago

  • Status changed from Open to Rejected

Please report an issue of JSON to its upstream, and it seems fixed already.

Actions

Also available in: Atom PDF