1
0
mirror of https://github.com/nbd-wtf/satdress.git synced 2024-11-11 16:30:35 +00:00

use the domain in the secret hmac.

This commit is contained in:
fiatjaf 2021-08-20 08:59:08 -03:00
parent d6354c1c69
commit 15bab1fcfb

View File

@ -78,7 +78,7 @@ func main() {
router.Path("/grab").HandlerFunc( router.Path("/grab").HandlerFunc(
func(w http.ResponseWriter, r *http.Request) { func(w http.ResponseWriter, r *http.Request) {
name := []byte(r.FormValue("name")) name := []byte(r.FormValue("name") + "@" + s.Domain)
mac := hmac.New(sha256.New, []byte(s.Secret)) mac := hmac.New(sha256.New, []byte(s.Secret))
mac.Write(name) mac.Write(name)