Files
codeql/go/ql/test/query-tests/Security/CWE-640/EmailGood.go
2022-05-20 10:07:19 -07:00

14 lines
308 B
Go

package main
import (
"net/http"
"net/smtp"
)
func mailGood(w http.ResponseWriter, r *http.Request) {
host := config["Host"]
token := backend.getUserSecretResetToken(email)
body := "Click to reset password: " + host + "/" + token
smtp.SendMail("test.test", nil, "from@from.com", nil, []byte(body))
}