From ab45bd487a935ae9558e814ca06b1e4e71ba554a Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 19 Feb 2008 23:06:09 +0000 Subject: URI.decode site username/password. Closes #11169 [Ernesto Jimenez] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8900 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activeresource/lib/active_resource/base.rb | 4 ++-- activeresource/lib/active_resource/connection.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'activeresource/lib') diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index d79198f49b..4d43a800eb 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -204,8 +204,8 @@ module ActiveResource @site = nil else @site = create_site_uri_from(site) - @user = @site.user if @site.user - @password = @site.password if @site.password + @user = URI.decode(@site.user) if @site.user + @password = URI.decode(@site.password) if @site.password end end diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb index cf4681b25b..c8cee7aaa3 100644 --- a/activeresource/lib/active_resource/connection.rb +++ b/activeresource/lib/active_resource/connection.rb @@ -76,8 +76,8 @@ module ActiveResource # Set URI for remote service. def site=(site) @site = site.is_a?(URI) ? site : URI.parse(site) - @user = @site.user if @site.user - @password = @site.password if @site.password + @user = URI.decode(@site.user) if @site.user + @password = URI.decode(@site.password) if @site.password end # Set user for remote service. -- cgit v1.2.3