Skip to content

Conversation

@DashCoreAutoGuix
Copy link
Owner

Summary

Backport of Bitcoin Core PR bitcoin#27477 - adds regression tests for invalid URI handling in the REST interface.

Original Bitcoin commit: 467fa89

Changes

  • Adds test cases for invalid URI handling (% symbol at end of request)
  • Tests three REST endpoints: /headers/, /blockfilterheaders/basic/, and /mempool/contents.json
  • Validates proper error message: "URI parsing failed, it likely contained RFC 3986 invalid characters"

Dash Adaptations

  • None required - test-only change that applies cleanly to Dash
  • Resolved minor conflict in test positioning while preserving Dash's expected_filter structure

Testing

  • Python syntax validated
  • Functional test interface_rest.py modified

Test Plan

  • Run test/functional/interface_rest.py to verify new test cases pass
  • Verify CI passes

Part of Bitcoin Core v0.25 backport batch 412

Generated with Claude Code

…valid URI segfaults)

6a77d29 test: add regression tests for bitcoin#27468 (invalid URI segfaults) (Sebastian Falbesoner)

Pull request description:

  Prior to PR bitcoin#27468 (commit 11422cc) all call-sites of `GetQueryParameter(...)` in the REST module could trigger a crash. Add missing test cases for all possible code-paths as a regression test, as a foundation for possible follow-up fixes (which aim to resolve this issue in a more general and robust way).

ACKs for top commit:
  stickies-v:
    ACK 6a77d29
  vasild:
    ACK 6a77d29

Tree-SHA512: b5dd22d7d448f92236575ea950287259795a957a3f8e364682510c7c1ede5f9d67e7daccc5146c8d0817bcb71742d49273801574bd2bb96e44a9ae5a006ac2a7
@coderabbitai
Copy link

coderabbitai bot commented Sep 30, 2025

Warning

Rate limit exceeded

@DashCoreAutoGuix has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 38 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 54e2588 and ad4c544.

📒 Files selected for processing (1)
  • test/functional/interface_rest.py (1 hunks)
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch backport-0.25-batch-412-pr-27477

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

3 participants