From 203b7c50f2ff251feb184b941424f5ac2c19b573 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 12 Feb 2005 05:12:56 +0000 Subject: [PATCH] * lib/open-uri.rb (OpenURI.open_http): reject userinfo explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ lib/open-uri.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 57be56a32f..d27502d090 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Feb 12 14:10:24 2005 Tanaka Akira + + * lib/open-uri.rb (OpenURI.open_http): reject userinfo explicitly. + Sat Feb 12 13:54:03 2005 Tanaka Akira * lib/open-uri.rb: support https if the platform provides CA diff --git a/lib/open-uri.rb b/lib/open-uri.rb index f29be17a46..344edc5e81 100644 --- a/lib/open-uri.rb +++ b/lib/open-uri.rb @@ -200,6 +200,10 @@ module OpenURI raise "Non-HTTP proxy URI: #{proxy}" if proxy.class != URI::HTTP end + if target.userinfo + raise "userinfo not supported. [RFC3986]" + end + require 'net/http' klass = Net::HTTP if URI::HTTP === target