0
0
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 21:30:16 +02:00

better info about incorrect passwords Fixes 237

This commit is contained in:
Zack Scholl 2020-09-03 12:45:40 -07:00
parent c7ba55fc83
commit bbc0ce4e9c

View file

@ -433,6 +433,9 @@ func (c *Client) Send(options TransferOptions) (err error) {
return
} else {
log.Debugf("error from errchan: %v", err)
if strings.Contains(err.Error(), "could not secure channel") {
return err
}
}
if !c.Options.DisableLocal {
if strings.Contains(err.Error(), "refusing files") || strings.Contains(err.Error(), "EOF") || strings.Contains(err.Error(), "bad password") {
@ -672,6 +675,10 @@ func (c *Client) transfer(options TransferOptions) (err error) {
}
fmt.Print("\n")
}
if err != nil && strings.Contains(err.Error(), "pake not successful") {
log.Debugf("pake error: %s", err.Error())
err = fmt.Errorf("password mismatch")
}
return
}