ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:51030] [Ruby master Feature#9045] URIに含まれるエンコードされたID/パスワードがデコードされない
       [not found] <redmine.issue-9045.20131023153748.2951@ruby-lang.org>
@ 2021-03-04 22:19 ` merch-redmine
  0 siblings, 0 replies; only message in thread
From: merch-redmine @ 2021-03-04 22:19 UTC (permalink / raw)
  To: ruby-dev

Issue #9045 has been updated by jeremyevans0 (Jeremy Evans).

ruby -v deleted (1.9.3p448)
Tracker changed from Bug to Feature

This is a request relating to #user and #password for URIs returning actual (encoded) values and not decoded values.  The fact that #user and #password return the actual and not decoded values is not a bug, and changing the behavior of the methods would break backwards compatibility. It seems simplest to address this need by adding #decoded_user and #decoded_password methods.  I've submitted a PR which does that: https://github.com/ruby/uri/pull/17

----------------------------------------
Feature #9045: URIに含まれるエンコードされたID/パスワードがデコードされない
https://bugs.ruby-lang.org/issues/9045#change-90739

* Author: vmi (Motonori IWAMURO)
* Status: Assigned
* Priority: Normal
* Assignee: akira (akira yamada)
----------------------------------------
URI(プロキシ設定も含む)にID/パスワードを含めるとき、IDやパスワードに「@」や「:」等がある場合はURIエンコードする必要がありますが、uriライブラリがこれをデコードしてくれません。
そのため、認証プロキシでIDに「@」が含まれていると認証に失敗するなどの問題が生じます。

ソースを追っかけて uri/generic.rb の問題だろうというところまでは調べたのですが、user/passwordを取り扱う部分がたくさんあるので、何処でエンコード/デコードすればいいのかよくわからない状況です。

とりあえず手元ではdef user と def password に URI.decode_www_form_component を突っ込んでますが、たぶんこれでは片手落ちと思われます。



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-04 22:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-9045.20131023153748.2951@ruby-lang.org>
2021-03-04 22:19 ` [ruby-dev:51030] [Ruby master Feature#9045] URIに含まれるエンコードされたID/パスワードがデコードされない merch-redmine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).