Skip to content

wallet: Support quoted external signer arguments - #37046

Open
hamdyaea wants to merge 1 commit into
bitcoin:masterfrom
hamdyaea:fix-signer-path-spaces
Open

hamdyaea wants to merge 1 commit into
bitcoin:masterfrom
hamdyaea:fix-signer-path-spaces

Conversation

@hamdyaea

@hamdyaea hamdyaea commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

The external signer command currently uses subprocess::util::split(), which does not correctly handle quoted arguments or executable paths containing spaces.

As mentioned in #34349, fixing the external signer command parsing was left as a follow-up.

This change introduces support for double-quoted arguments, preserves the existing behavior for repeated whitespace, handles escaped quotes and backslashes within quoted arguments, and rejects unterminated quotes.

The external signer documentation and functional tests have been updated accordingly.

Testing performed on Linux x86_64:

  • rpc_signer.py: PASS
  • wallet_signer.py: PASS
  • Repository paths containing spaces: PASS
  • Temporary paths containing spaces and Unicode characters: PASS
  • Unterminated quote rejection: PASS
  • Standalone parser test vectors: PASS
  • git diff --check: PASS

Native Windows testing has not been performed.

@DrahtBot DrahtBot added the Wallet label Dec 2, 2026
@DrahtBot

DrahtBot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.
A summary of reviews will appear here.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #36114 (wallet: harden external signer psbt processing, revamp mock by Sjors)
  • #33112 (wallet: relax external_signer flag constraints by Sjors)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants