Bläddra i källkod

smtp: fix calls to Printf(s) with non constant format

Merge from net/smtp/smtp.go

Obtained from:	bf91eb3a8bb057a620f3823e4d6b74a529c0a44d
Bernhard Froehlich 1 månad sedan
förälder
incheckning
2753d3670d
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      smtp.go

+ 2 - 2
smtp.go

@@ -207,7 +207,7 @@ func (c *Client) Auth(a smtp.Auth) error {
 	}
 	resp64 := make([]byte, encoding.EncodedLen(len(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 {
 		var msg []byte
 		switch code {
@@ -233,7 +233,7 @@ func (c *Client) Auth(a smtp.Auth) error {
 		}
 		resp64 = make([]byte, encoding.EncodedLen(len(resp)))
 		encoding.Encode(resp64, resp)
-		code, msg64, err = c.cmd(0, string(resp64))
+		code, msg64, err = c.cmd(0, "%s", resp64)
 	}
 	return err
 }