Skip to content

Enforce Authorization header on index-server#327

Merged
folbricht merged 1 commit intomasterfrom
fix-index-server-auth
Apr 18, 2026
Merged

Enforce Authorization header on index-server#327
folbricht merged 1 commit intomasterfrom
fix-index-server-auth

Conversation

@folbricht
Copy link
Copy Markdown
Owner

@folbricht folbricht commented Apr 18, 2026

Summary

  • HTTPIndexHandler stored the configured authorization value but never checked it against incoming requests, so --authorization / DESYNC_HTTP_AUTH silently had no effect on desync index-server.
  • Add the same check the chunk handler already performs (httphandler.go:34), using crypto/subtle.ConstantTimeCompare to avoid leaking the configured token through timing.

The index-server handler stored the configured authorization value but
never compared it against incoming requests, so --authorization and
DESYNC_HTTP_AUTH had no effect. Add the same check used by the chunk
handler, using crypto/subtle.ConstantTimeCompare to avoid timing
side-channels.
@folbricht folbricht marked this pull request as ready for review April 18, 2026 15:32
@folbricht folbricht merged commit f7d972e into master Apr 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant