Project

General

Profile

Actions

Bug #8979

closed

gem のプロキシ認証情報に @ を含むとエラー

Bug #8979: gem のプロキシ認証情報に @ を含むとエラー

Added by tommy (Masahiro Tomita) about 12 years ago. Updated about 12 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.0.0p247 (2013-06-27 revision 41674) [i686-linux]
[ruby-dev:47741]

Description

gem 実行時に認証が必要なプロキシを通す場合、プロキシの認証IDまたはパスワードに「@」を含んでいるとエラーになってしまいます。


% http_proxy=http://localhost:8080 http_proxy_user='foo@bar' http_proxy_pass='xxx' gem list -r mysql

*** REMOTE GEMS ***

ERROR: While executing gem ... (URI::InvalidComponentError)
bad component(expected userinfo component or user component): foo@bar

また、%エンコーディングされる文字を含んでいる場合は、デコードしないで認証を試みるので、認証が失敗してしまいます。

添付のパッチで直ると思います。


Files

rubygems-remote_fetcher.patch (3.26 KB) rubygems-remote_fetcher.patch tommy (Masahiro Tomita), 10/03/2013 12:56 AM

Updated by hsbt (Hiroshi SHIBATA) about 12 years ago Actions #1 [ruby-dev:47744]

  • Category set to lib/rubygems
  • Assignee set to kou (Kouhei Sutou)

Updated by kou (Kouhei Sutou) about 12 years ago Actions #2 [ruby-dev:47745]

RubyGemsのmasterではそこらへんのコードが変わっているので、いい感じにして直しておきます!

Updated by kou (Kouhei Sutou) about 12 years ago Actions #3 [ruby-dev:47746]

  • Status changed from Open to Assigned

Updated by drbrain (Eric Hodel) about 12 years ago Actions #4 [ruby-dev:47758]

I have fixed this here on RubyGems master:

https://github.com/rubygems/rubygems/commit/c355880f2016597b3f0f632fbcdc688313052009

I will apply this patch to RubyGems 2.0 branch, release it and create a backport request for the new version on Monday (Pacific Time).

Updated by drbrain (Eric Hodel) about 12 years ago Actions #5 [ruby-dev:47759]

I have updated #9014 with RubyGems 2.0.12 which contains this fix.

I will update trunk after I fix a separate bug that would break RubyGems if imported.

You can also install RubyGems 2.1.9 (latest) which will fix this issue.

Updated by drbrain (Eric Hodel) about 12 years ago Actions #6 [ruby-dev:47760]

This bug was fixed by r43298

Updated by drbrain (Eric Hodel) about 12 years ago Actions #7 [ruby-dev:47761]

  • Status changed from Assigned to Closed
Actions

Also available in: PDF Atom