Skip to content

feat(drand-tools): reject redirected chain-info and beacon requests - #684

Open
chainsmt wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
chainsmt:feat/drand-no-redirect
Open

chainsmt wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
chainsmt:feat/drand-no-redirect

Conversation

@chainsmt

@chainsmt chainsmt commented Nov 24, 2026 •

Copy link
Copy Markdown

Summary

Drand tools should talk to the configured chain-info and beacon endpoints directly. Following redirects would let an intermediary choose the destination, which is unsafe for randomness tooling.

What changed

  • getChainInfo / getBeacon use redirect: "manual" so 3xx responses are never followed.
  • 3xx responses raise DrandRedirectError with a stable http_redirect category.
  • Location is omitted from error messages and logs.
  • Redirect fixtures and tests cover chain-info and beacon paths.

Acceptance criteria

  • Automatic redirects disabled for chain-info and beacon fetches
  • One stable error category for 3xx responses
  • Location headers not included in logs
  • Redirect tests added

Test plan

  • Redirect-focused package tests (12/12)

Closes #676

@drips-wave

drips-wave Bot commented Nov 24, 2026

Copy link
Copy Markdown

@chainsmt Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

drand-tools(high/easy): reject redirected chain-info and beacon requests

1 participant