Hello community, here is the log from the commit of package rubygem-yajl-ruby for openSUSE:Factory checked in at 2017-11-16 14:04:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-yajl-ruby (Old) and /work/SRC/openSUSE:Factory/.rubygem-yajl-ruby.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-yajl-ruby" Thu Nov 16 14:04:24 2017 rev:13 rq:542211 version:1.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-yajl-ruby/rubygem-yajl-ruby.changes 2017-07-17 09:08:44.668335214 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-yajl-ruby.new/rubygem-yajl-ruby.changes 2017-11-16 14:04:25.934193513 +0100 @@ -1,0 +2,8 @@ +Wed Nov 8 08:19:56 UTC 2017 - [email protected] + +- updated to version 1.3.1 + no changelog entry found + + Fixes bsc#1066565 + +------------------------------------------------------------------- Old: ---- yajl-ruby-1.3.0.gem New: ---- yajl-ruby-1.3.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-yajl-ruby.spec ++++++ --- /var/tmp/diff_new_pack.Xq5DNm/_old 2017-11-16 14:04:27.366141613 +0100 +++ /var/tmp/diff_new_pack.Xq5DNm/_new 2017-11-16 14:04:27.370141468 +0100 @@ -24,14 +24,14 @@ # Name: rubygem-yajl-ruby -Version: 1.3.0 +Version: 1.3.1 Release: 0 %define mod_name yajl-ruby %define mod_full_name %{mod_name}-%{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: ruby-macros >= 5 BuildRequires: %{rubydevel >= 1.8.6} BuildRequires: %{rubygem gem2rpm} +BuildRequires: ruby-macros >= 5 Url: http://github.com/brianmario/yajl-ruby Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1: rubygem-yajl-ruby-rpmlintrc ++++++ yajl-ruby-1.3.0.gem -> yajl-ruby-1.3.1.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 2016-11-01 23:23:18.000000000 +0100 +++ new/.travis.yml 2017-11-07 07:19:50.000000000 +0100 @@ -1,14 +1,9 @@ language: ruby rvm: - - 1.8.7 - - 1.9.2 - - 1.9.3 - 2.0.0 - 2.1 - - rbx-2 - - ree + - 2.2 + - 2.3 + - 2.4.1 - ruby-head before_install: gem install bundler --no-document -matrix: - allow_failures: - - rvm: rbx-2 Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/yajl/yajl_encode.c new/ext/yajl/yajl_encode.c --- old/ext/yajl/yajl_encode.c 2016-11-01 23:23:18.000000000 +0100 +++ new/ext/yajl/yajl_encode.c 2017-11-07 07:19:50.000000000 +0100 @@ -162,8 +162,8 @@ end+=3; /* check if this is a surrogate */ if ((codepoint & 0xFC00) == 0xD800) { - end++; - if (str[end] == '\\' && str[end + 1] == 'u') { + if (end + 2 < len && str[end + 1] == '\\' && str[end + 2] == 'u') { + end++; unsigned int surrogate = 0; hexToDigit(&surrogate, str + end + 2); codepoint = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/yajl/bzip2.rb new/lib/yajl/bzip2.rb --- old/lib/yajl/bzip2.rb 2016-11-01 23:23:18.000000000 +0100 +++ new/lib/yajl/bzip2.rb 2017-11-07 07:19:50.000000000 +0100 @@ -6,6 +6,6 @@ require 'bzip2' unless defined?(Bzip2) require 'yajl/bzip2/stream_reader.rb' require 'yajl/bzip2/stream_writer.rb' -rescue LoadError => e +rescue LoadError raise "Unable to load the bzip2 library. Is the bzip2-ruby gem installed?" -end \ No newline at end of file +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/yajl/http_stream.rb new/lib/yajl/http_stream.rb --- old/lib/yajl/http_stream.rb 2016-11-01 23:23:18.000000000 +0100 +++ new/lib/yajl/http_stream.rb 2017-11-07 07:19:50.000000000 +0100 @@ -4,6 +4,7 @@ require 'yajl' require 'yajl/version' unless defined? Yajl::VERSION require 'uri' +require 'cgi' module Yajl # This module is for making HTTP requests to which the response bodies (and possibly requests in the near future) @@ -101,7 +102,7 @@ default_headers["Content-Type"] = opts["Content-Type"] || "application/x-www-form-urlencoded" body = opts.delete(:body) if body.is_a?(Hash) - body = body.keys.collect {|param| "#{URI.escape(param.to_s)}=#{URI.escape(body[param].to_s)}"}.join('&') + body = body.keys.collect {|param| "#{CGI.escape(param.to_s)}=#{CGI.escape(body[param].to_s)}"}.join('&') end default_headers["Content-Length"] = body.length end @@ -161,7 +162,7 @@ if block_given? chunkLeft = 0 while !socket.eof? && (line = socket.gets) - break if line.match /^0.*?\r\n/ + break if line.match(/^0.*?\r\n/) next if line == "\r\n" size = line.hex json = socket.read(size) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/yajl/version.rb new/lib/yajl/version.rb --- old/lib/yajl/version.rb 2016-11-01 23:23:18.000000000 +0100 +++ new/lib/yajl/version.rb 2017-11-07 07:19:50.000000000 +0100 @@ -1,3 +1,3 @@ module Yajl - VERSION = '1.3.0' + VERSION = '1.3.1' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2016-11-01 23:23:18.000000000 +0100 +++ new/metadata 2017-11-07 07:19:50.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: yajl-ruby version: !ruby/object:Gem::Version - version: 1.3.0 + version: 1.3.1 platform: ruby authors: - Brian Lopez @@ -9,7 +9,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2016-11-01 00:00:00.000000000 Z +date: 2017-11-07 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake-compiler @@ -246,7 +246,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.6.3 +rubygems_version: 2.6.11 signing_key: specification_version: 4 summary: Ruby C bindings to the excellent Yajl JSON stream-based parser library. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/parsing/one_off_spec.rb new/spec/parsing/one_off_spec.rb --- old/spec/parsing/one_off_spec.rb 2016-11-01 23:23:18.000000000 +0100 +++ new/spec/parsing/one_off_spec.rb 2017-11-07 07:19:50.000000000 +0100 @@ -2,6 +2,13 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper.rb') describe "One-off JSON examples" do + it "should not blow up with a bad surrogate trailer" do + # https://github.com/brianmario/yajl-ruby/issues/176 + bad_json = "{\"e\":{\"\\uD800\\\\DC00\":\"a\"}}" + + Yajl::Parser.new.parse(bad_json) + end + it "should parse 23456789012E666 and return Infinity" do infinity = (1.0/0) silence_warnings do
