vendor: update x/crypto/ssh - to fix Windows password length issues fixes #3798
This commit is contained in:
+4
@@ -947,6 +947,10 @@ func readPasswordLine(reader io.Reader) ([]byte, error) {
|
||||
n, err := reader.Read(buf[:])
|
||||
if n > 0 {
|
||||
switch buf[0] {
|
||||
case '\b':
|
||||
if len(ret) > 0 {
|
||||
ret = ret[:len(ret)-1]
|
||||
}
|
||||
case '\n':
|
||||
return ret, nil
|
||||
case '\r':
|
||||
|
||||
+2
-2
@@ -85,8 +85,8 @@ func ReadPassword(fd int) ([]byte, error) {
|
||||
}
|
||||
old := st
|
||||
|
||||
st &^= (windows.ENABLE_ECHO_INPUT)
|
||||
st |= (windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT)
|
||||
st &^= (windows.ENABLE_ECHO_INPUT | windows.ENABLE_LINE_INPUT)
|
||||
st |= (windows.ENABLE_PROCESSED_OUTPUT | windows.ENABLE_PROCESSED_INPUT)
|
||||
if err := windows.SetConsoleMode(windows.Handle(fd), st); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -203,7 +203,7 @@ go.opencensus.io/trace/propagation
|
||||
go.opencensus.io/trace/tracestate
|
||||
# goftp.io/server v0.0.0-20190812052725-72a57b186803
|
||||
goftp.io/server
|
||||
# golang.org/x/crypto v0.0.0-20200109152110-61a87790db17
|
||||
# golang.org/x/crypto v0.0.0-20200117160349-530e935923ad
|
||||
golang.org/x/crypto/bcrypt
|
||||
golang.org/x/crypto/blowfish
|
||||
golang.org/x/crypto/chacha20
|
||||
|
||||
Reference in New Issue
Block a user