1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00

fix: external url and mac function matching

This commit is contained in:
Kwonunn 2025-01-26 15:56:55 +01:00 committed by Kwonunn
parent 57a2a56e32
commit 43f1298653
2 changed files with 3 additions and 1 deletions

View file

@ -45,7 +45,9 @@ func validateAge(ts string) bool {
func computeMac(secret, repo, run, ts string) string {
mac := hmac.New(sha256.New, []byte(secret))
mac.Write([]byte(repo))
mac.Write([]byte(">"))
mac.Write([]byte(run))
mac.Write([]byte(">"))
mac.Write([]byte(ts))
return hex.EncodeToString(mac.Sum(nil))
}