fix: 6 bugs (timeline path value, seer SSE cursor, erasure checksum, subtle compare, build status code, dead WorkerName branch)
Some checks failed
Test / test (push) Has been cancelled

This commit is contained in:
drjones
2026-07-05 07:06:59 +00:00
parent 3678b199d0
commit f923b1ef54
6 changed files with 61 additions and 16 deletions

View File

@@ -1,6 +1,7 @@
package fleet
import (
"crypto/subtle"
"encoding/json"
"log"
"net/http"
@@ -329,14 +330,7 @@ func (h *Hub) HandleBeacon(store *Store) http.HandlerFunc {
}
func constantTimeEqual(a, b string) bool {
if len(a) != len(b) {
return false
}
var v byte
for i := 0; i < len(a); i++ {
v |= a[i] ^ b[i]
}
return v == 0
return subtle.ConstantTimeCompare([]byte(a), []byte(b)) == 1
}
func coalesce(values ...string) string {