build: Quote host paths in NSIS installer template
What changed, and why it matters
This commit fixes a Windows installer build script so that directory paths containing spaces are properly quoted. It is a build-system reliability fix, not a security vulnerability. There is no indication it can be exploited to attack users or the software.
No security action needed. Treat as a normal build-system fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change quotes paths in the NSIS installer template (share/setup.nsi.in) so that makensis can parse File instructions when @BIN_DIR@, @abs_top_srcdir@, or @LIBEXEC_DIR@ contain spaces. Without quoting, the build would fail for the deploy target. The diff shows only added double quotes around file paths; no executable code, privilege boundary, or input handling is changed.
Changed components
share/setup.nsi.inInspect captured patch +11 / −11
diff --git a/share/setup.nsi.in b/share/setup.nsi.in
index d807b718..33baa477 100644
--- a/share/setup.nsi.in
+++ b/share/setup.nsi.in
@@ -72,19 +72,19 @@ ShowUninstDetails show
Section -Main SEC0000
SetOutPath $INSTDIR
SetOverwrite on
- File @BIN_DIR@/@BITCOIN_GUI_NAME@@EXEEXT@
- File @BIN_DIR@/@BITCOIN_WRAPPER_NAME@@EXEEXT@
- File /oname=COPYING.txt @abs_top_srcdir@/COPYING
- File /oname=readme.txt @abs_top_srcdir@/doc/README_windows.txt
- File @abs_top_srcdir@/share/examples/bitcoin.conf
+ File "@BIN_DIR@/@BITCOIN_GUI_NAME@@EXEEXT@"
+ File "@BIN_DIR@/@BITCOIN_WRAPPER_NAME@@EXEEXT@"
+ File /oname=COPYING.txt "@abs_top_srcdir@/COPYING"
+ File /oname=readme.txt "@abs_top_srcdir@/doc/README_windows.txt"
+ File "@abs_top_srcdir@/share/examples/bitcoin.conf"
SetOutPath $INSTDIR\share\rpcauth
- File @abs_top_srcdir@/share/rpcauth/*.*
+ File "@abs_top_srcdir@/share/rpcauth/*.*"
SetOutPath $INSTDIR\daemon
- File @BIN_DIR@/@BITCOIN_DAEMON_NAME@@EXEEXT@
- File @BIN_DIR@/@BITCOIN_CLI_NAME@@EXEEXT@
- File @BIN_DIR@/@BITCOIN_TX_NAME@@EXEEXT@
- File @BIN_DIR@/@BITCOIN_WALLET_TOOL_NAME@@EXEEXT@
- File @LIBEXEC_DIR@/@BITCOIN_TEST_NAME@@EXEEXT@
+ File "@BIN_DIR@/@BITCOIN_DAEMON_NAME@@EXEEXT@"
+ File "@BIN_DIR@/@BITCOIN_CLI_NAME@@EXEEXT@"
+ File "@BIN_DIR@/@BITCOIN_TX_NAME@@EXEEXT@"
+ File "@BIN_DIR@/@BITCOIN_WALLET_TOOL_NAME@@EXEEXT@"
+ File "@LIBEXEC_DIR@/@BITCOIN_TEST_NAME@@EXEEXT@"
SetOutPath $INSTDIR
WriteRegStr HKCU "${REGKEY}\Components" Main 1
SectionEnd
Why this scored 16/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.