YAML.load fails on Base64 encoded binary data created by yaml "Length of Base64 
encoded input string is not a multiple of 4."
-----------------------------------------------------------------------------------------------------------------------------

                 Key: JRUBY-3533
                 URL: http://jira.codehaus.org/browse/JRUBY-3533
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.2
         Environment: java -version                                             
                            
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)

            Reporter: Shawn Ferry
         Attachments: foo.b64, foo.yaml

YAML generated by 

jruby -e "require 'yaml'; p JRUBY_VERSION; p 
YAML.load(File.open('../test/foo.yaml'))"
"1.2.0"
Base64Coder.java:79:in `decode': java.lang.IllegalArgumentException: Length of 
Base64 encoded input string is not a multiple of 4.


ruby -e "require 'yaml'; p RUBY_VERSION; p 
YAML.load(File.open('../test/foo.yaml'))" | more
"1.8.6"
{:msg_map=>{:MESSAGE=>"ControlTowerServer[68251-0]: 6.2.86.114 ctldm[879] [ID 
702911 local0.error] [0] [1] Error: unable to use socket - Status: 
NoMoreData.", :RAW_MESSAGE=>"<131>Mar 26 01:42:54 ControlT
owerServer[68251-0]: 6.2.86.114 ctldm[879] [ID 702911 local0.error] [0] [1] 
Error: unable to use socket - Status: 
NoMoreData.\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\0
00\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000...


Manually extracted Base64 data is clean 
ruby -e "require 'base64'; p RUBY_VERSION; p 
Base64.decode64(File.read('../test/foo.b64'))"
jruby -e "require 'base64'; p JRUBY_VERSION; p 
Base64.decode64(File.read('../test/foo.b64'))"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to