зеркало из https://github.com/golang/net.git
socks: SOCKS5 proxy with empty password should be allowed
The behavior is accepted widely, and I found no reason to deny it. Fixes #57285
This commit is contained in:
Родитель
e1ec361d0b
Коммит
b00ecb1d7a
|
@ -289,7 +289,7 @@ func (up *UsernamePassword) Authenticate(ctx context.Context, rw io.ReadWriter,
|
|||
case AuthMethodNotRequired:
|
||||
return nil
|
||||
case AuthMethodUsernamePassword:
|
||||
if len(up.Username) == 0 || len(up.Username) > 255 || len(up.Password) == 0 || len(up.Password) > 255 {
|
||||
if len(up.Username) == 0 || len(up.Username) > 255 || len(up.Password) > 255 {
|
||||
return errors.New("invalid username/password")
|
||||
}
|
||||
b := []byte{authUsernamePasswordVersion}
|
||||
|
|
Загрузка…
Ссылка в новой задаче