]> Cypherpunks repositories - gostls13.git/commit
net/http: strip escaped password from error
authorThanabodee Charoenpiriyakij <wingyminus@gmail.com>
Fri, 3 May 2019 04:41:54 +0000 (11:41 +0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 3 May 2019 15:20:41 +0000 (15:20 +0000)
commit2c67cdf7cf59a685f3a5e705b6be85f32285acec
treef9ce9eb3fca42619333172b135af62a65433465c
parentf5c43b919499899fe006896643bbfebbea9d1995
net/http: strip escaped password from error

Using password that returns from User.Password() won't work in this case
because password in Userinfo already unescaped. The solution is uses
User.String() to escape password back again and then stringify it to error.

Fixes #31808

Change-Id: I723aafd5a57a5b69f2dd7d3a21b82ebbd4174451
Reviewed-on: https://go-review.googlesource.com/c/go/+/175018
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/net/http/client.go
src/net/http/client_test.go