mirror of
https://github.com/decke/smtprelay.git
synced 2025-12-27 08:32:30 -07:00
smtp: fix calls to Printf(s) with non constant format
Merge from net/smtp/smtp.go Obtained from: bf91eb3a8bb057a620f3823e4d6b74a529c0a44d
This commit is contained in:
4
smtp.go
4
smtp.go
@@ -207,7 +207,7 @@ func (c *Client) Auth(a smtp.Auth) error {
|
|||||||
}
|
}
|
||||||
resp64 := make([]byte, encoding.EncodedLen(len(resp)))
|
resp64 := make([]byte, encoding.EncodedLen(len(resp)))
|
||||||
encoding.Encode(resp64, resp)
|
encoding.Encode(resp64, resp)
|
||||||
code, msg64, err := c.cmd(0, strings.TrimSpace(fmt.Sprintf("AUTH %s %s", mech, resp64)))
|
code, msg64, err := c.cmd(0, "%s", strings.TrimSpace(fmt.Sprintf("AUTH %s %s", mech, resp64)))
|
||||||
for err == nil {
|
for err == nil {
|
||||||
var msg []byte
|
var msg []byte
|
||||||
switch code {
|
switch code {
|
||||||
@@ -233,7 +233,7 @@ func (c *Client) Auth(a smtp.Auth) error {
|
|||||||
}
|
}
|
||||||
resp64 = make([]byte, encoding.EncodedLen(len(resp)))
|
resp64 = make([]byte, encoding.EncodedLen(len(resp)))
|
||||||
encoding.Encode(resp64, resp)
|
encoding.Encode(resp64, resp)
|
||||||
code, msg64, err = c.cmd(0, string(resp64))
|
code, msg64, err = c.cmd(0, "%s", resp64)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user