diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-02-19 23:06:09 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-02-19 23:06:09 +0000 |
commit | ab45bd487a935ae9558e814ca06b1e4e71ba554a (patch) | |
tree | 79262724491f5f66975ce57c6a650e483b21a43a /activeresource/lib | |
parent | 1537aec18453907db3e67dc366eb51f11f94055d (diff) | |
download | rails-ab45bd487a935ae9558e814ca06b1e4e71ba554a.tar.gz rails-ab45bd487a935ae9558e814ca06b1e4e71ba554a.tar.bz2 rails-ab45bd487a935ae9558e814ca06b1e4e71ba554a.zip |
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
Diffstat (limited to 'activeresource/lib')
-rw-r--r-- | activeresource/lib/active_resource/base.rb | 4 | ||||
-rw-r--r-- | activeresource/lib/active_resource/connection.rb | 4 |
2 files changed, 4 insertions, 4 deletions
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. |