Database names with spaces cause firewall detection to fail - sqlcmd argument not quoted
@dzsquared ci sta già lavorando.
Dal 20/1/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
When the connection string contains a database name with a space (e.g. Initial Catalog=MyDatabase Live), the firewall IP detection step fails because the database name is not properly quoted when passed to sqlcmd.
Error:
Failed to add firewall rule. Unable to detect client IP Address. Sqlcmd: 'Live': Unknown command. Enter '--help' for command help.
Debug output:
##[debug]Validating if client has access to 'MyDatabase Live' on 'myserver.database.windows.net'.
##[debug]The process 'sqlcmd' failed with exit code 1
##[debug]SqlCmd stderr: Sqlcmd: 'Live': Unknown command. Enter '--help' for command help.
The action correctly parses the database name as MyDatabase Live, but fails to quote it when executing sqlcmd.
Environment:
azure/sql-action@v2.3runs-on: ubuntu-latest- Azure SQL Database with
Authentication=Active Directory Default
Connection string:
Server=myserver.database.windows.net;Initial Catalog=MyDatabase Live;Authentication=Active Directory Default;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
Attempted workarounds (none worked):
- Single quotes:
Initial Catalog='MyDatabase Live' - Double quotes:
Initial Catalog="MyDatabase Live"
Potential root cause:
The detectIPAddress function extracts the database name correctly but may pass it to sqlcmd as the -d argument without quoting, resulting in:
sqlcmd -S myserver.database.windows.net -d MyDatabase Live -Q "select getdate()"
Expected behaviour:
sqlcmd -S myserver.database.windows.net -d "MyDatabase Live" -Q "select getdate()"
- Lingua principale
- TypeScript
- Stelle
- 142
- Fork
- 73
- Merge medio
- 9g 18h
- PR unite (30g)
- 2
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Azure/sql-action
-
Bump Major Tag Version Apertaneed-to-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
Azure/sql-action#247 ·
-
need-to-triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
Azure/sql-action#282 ·
-
need-to-triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
Azure/sql-action#262 · 1 commento ·
-
need-to-triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Azure/sql-action#261 ·
-
need-to-triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Azure/sql-action#256 · 1 commento ·
Tutte le issue di Azure/sql-action
Issue simili
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Crush Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
ElementsProject/cln-application#167 · 1 commento · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Quantco/pnpm-licenses#17 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100