Hello community,

here is the log from the commit of package rubygem-amq-protocol for 
openSUSE:Factory checked in at 2020-10-05 19:29:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-amq-protocol (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-amq-protocol.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-amq-protocol"

Mon Oct  5 19:29:49 2020 rev:18 rq:838019 version:2.3.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-amq-protocol/rubygem-amq-protocol.changes    
    2020-05-11 13:39:00.496822573 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-amq-protocol.new.4249/rubygem-amq-protocol.changes
      2020-10-05 19:29:56.124531864 +0200
@@ -1,0 +2,7 @@
+Fri Sep 25 13:25:24 UTC 2020 - Stephan Kulow <[email protected]>
+
+updated to version 2.3.2
+ see installed ChangeLog.md
+
+
+-------------------------------------------------------------------

Old:
----
  amq-protocol-2.3.1.gem

New:
----
  amq-protocol-2.3.2.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-amq-protocol.spec ++++++
--- /var/tmp/diff_new_pack.o6eNEM/_old  2020-10-05 19:29:57.516533208 +0200
+++ /var/tmp/diff_new_pack.o6eNEM/_new  2020-10-05 19:29:57.516533208 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-amq-protocol
-Version:        2.3.1
+Version:        2.3.2
 Release:        0
 %define mod_name amq-protocol
 %define mod_full_name %{mod_name}-%{version}

++++++ amq-protocol-2.3.1.gem -> amq-protocol-2.3.2.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ChangeLog.md new/ChangeLog.md
--- old/ChangeLog.md    2020-04-08 05:26:40.000000000 +0200
+++ new/ChangeLog.md    2020-07-10 14:41:29.000000000 +0200
@@ -1,7 +1,15 @@
-## Changes between 2.3.1 and 2.3.2 (unreleased)
+## Changes between 2.3.2 and 2.3.3 (unreleased)
 
 No changes yet.
 
+## Changes between 2.3.1 and 2.3.2 (July 10th, 2020)
+
+### Safer Encoding Handling When Serialising Message Properties and Headers
+
+Contributed by @bbascarevic-tti.
+
+GitHub issue: 
[ruby-amqp/amq-protocol#76](https://github.com/ruby-amqp/amq-protocol/issues/76)
+
 
 ## Changes between 2.3.0 and 2.3.1 (April 8th, 2020)
 
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/amq/protocol/table_value_encoder.rb 
new/lib/amq/protocol/table_value_encoder.rb
--- old/lib/amq/protocol/table_value_encoder.rb 2020-04-08 05:26:40.000000000 
+0200
+++ new/lib/amq/protocol/table_value_encoder.rb 2020-07-10 14:41:29.000000000 
+0200
@@ -27,12 +27,12 @@
         when String then
           accumulator << TYPE_STRING
           accumulator << [value.bytesize].pack(PACK_UINT32)
-          accumulator << value
+          accumulator << value.dup.force_encoding(accumulator.encoding)
         when Symbol then
           str = value.to_s
           accumulator << TYPE_STRING
           accumulator << [str.bytesize].pack(PACK_UINT32)
-          accumulator << str
+          accumulator << str.force_encoding(accumulator.encoding)
         when Integer then
           accumulator << TYPE_SIGNED_64BIT
           accumulator << [value].pack(PACK_INT64_BE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/amq/protocol/version.rb 
new/lib/amq/protocol/version.rb
--- old/lib/amq/protocol/version.rb     2020-04-08 05:26:40.000000000 +0200
+++ new/lib/amq/protocol/version.rb     2020-07-10 14:41:29.000000000 +0200
@@ -1,5 +1,5 @@
 module AMQ
   module Protocol
-    VERSION = "2.3.1"
+    VERSION = "2.3.2"
   end # Protocol
 end # AMQ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2020-04-08 05:26:40.000000000 +0200
+++ new/metadata        2020-07-10 14:41:29.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: amq-protocol
 version: !ruby/object:Gem::Version
-  version: 2.3.1
+  version: 2.3.2
 platform: ruby
 authors:
 - Jakub Stastny
@@ -11,7 +11,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2020-04-08 00:00:00.000000000 Z
+date: 2020-07-10 00:00:00.000000000 Z
 dependencies: []
 description: |2
     amq-protocol is an AMQP 0.9.1 serialization library for Ruby. It is not a
@@ -101,7 +101,7 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.0.3
+rubygems_version: 3.1.2
 signing_key: 
 specification_version: 4
 summary: AMQP 0.9.1 encoding & decoding library.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/amq/protocol/table_spec.rb 
new/spec/amq/protocol/table_spec.rb
--- old/spec/amq/protocol/table_spec.rb 2020-04-08 05:26:40.000000000 +0200
+++ new/spec/amq/protocol/table_spec.rb 2020-07-10 14:41:29.000000000 +0200
@@ -46,6 +46,16 @@
             to 
eql("\x00\x00\x00$\vcoordinatesF\x00\x00\x00\x13\tlongituded@2\x11\x11\x16\xA8\xB8\xF1".force_encoding(Encoding::ASCII_8BIT))
         end
 
+        it "should serialize long UTF-8 strings and symbols" do
+          long_utf8 = "à" * 192
+          long_ascii8 = long_utf8.dup.force_encoding(::Encoding::ASCII_8BIT)
+
+          input = { "utf8_string" => long_utf8, "utf8_symbol" => 
long_utf8.to_sym }
+          output = { "utf8_string" => long_ascii8, "utf8_symbol" => 
long_ascii8 }
+
+          expect(Table.decode(Table.encode(input))).to eq(output)
+        end
+
         DATA.each do |data, encoded|
           it "should return #{encoded.inspect} for #{data.inspect}" do
             expect(Table.encode(data)).to 
eql(encoded.force_encoding(Encoding::ASCII_8BIT))
@@ -204,7 +214,7 @@
                 "rev"   => 1.0,
                 "spec"  => {
                   "url"  => "http://bit.ly/hw2ELX";,
-                  "utf8" => "à bientôt".force_encoding(::Encoding::ASCII_8BIT)
+                  "utf8" => "à bientôt"
                 }
               },
               "true"     => true,
@@ -212,7 +222,7 @@
               "nil"      => nil
             }
           }
-          expect(Table.decode(Table.encode(input))).to eq(input)
+          expect(Table.decode(Table.encode(input))).to eq(input.tap { |r| 
r["hashval"]["protocol"]["spec"]["utf8"].force_encoding(::Encoding::ASCII_8BIT) 
})
         end
 
 


Reply via email to