aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmlrpc
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-25 13:21:49 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-25 13:21:49 +0000
commit2fff0f4f71452e161825f079de9f7c65b088b260 (patch)
tree3db6cd146a9497605ad8f9d516901f236bd30707 /lib/xmlrpc
parent0a9b952c6f314665af1a58f6f411f752343e9691 (diff)
downloadruby-2fff0f4f71452e161825f079de9f7c65b088b260.tar.gz
* lib/xmlrpc/client.rb: Fix possible HTTP header formatting failure by
'Basic' header. Long username caused the base64 String truncation in HTTP header which is not allowed. See #5046. * test/xmlrpc/test_webrick_server.rb: test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/xmlrpc')
-rw-r--r--lib/xmlrpc/client.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xmlrpc/client.rb b/lib/xmlrpc/client.rb
index 65c9cd0c9c..c09a9514d6 100644
--- a/lib/xmlrpc/client.rb
+++ b/lib/xmlrpc/client.rb
@@ -493,7 +493,7 @@ module XMLRPC
else
a = "#@user"
a << ":#@password" if @password != nil
- @auth = ("Basic " + [a].pack("m")).chomp
+ @auth = "Basic " + [a].pack("m0")
end
end