mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
review: fix various issues brought up by Gusted
This commit is contained in:
parent
7a21d64333
commit
ef43d7c615
2 changed files with 20 additions and 13 deletions
|
@ -25,7 +25,7 @@ func (h *Handler) validateMac(rundata cacheproxy.RunData) (string, error) {
|
|||
}
|
||||
|
||||
expectedMAC := computeMac(h.secret, rundata.RepositoryFullName, rundata.RunNumber, rundata.Timestamp)
|
||||
if expectedMAC == rundata.RepositoryMAC {
|
||||
if hmac.Equal([]byte(expectedMAC), []byte(rundata.RepositoryMAC)) {
|
||||
return rundata.RepositoryFullName, nil
|
||||
}
|
||||
return rundata.RepositoryFullName, ErrValidation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue