Skip to content

Commit 77ee93d

Browse files
committed
Pass password as first arg to Python and Node URL-encoding commands
Pass the password as argv[1] (single-quoted) instead of embedding it in the inline script. Avoids escaping issues with special characters in the script string itself.
1 parent ce197fc commit 77ee93d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/partials/_livesync-connection-string-note.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ If you prefer not to paste your password into a form, you can URL-encode it in y
1414
<TabItem label="Python">
1515

1616
```bash
17-
python3 -c "import urllib.parse; print(urllib.parse.quote('<password>'))"
17+
python3 -c "import sys, urllib.parse; print(urllib.parse.quote(sys.argv[1]))" '<password>'
1818
```
1919

2020
</TabItem>
2121
<TabItem label="Node.js">
2222

2323
```bash
24-
node -e "console.log(encodeURIComponent('<password>'))"
24+
node -e "console.log(encodeURIComponent(process.argv[1]))" '<password>'
2525
```
2626

2727
</TabItem>

0 commit comments

Comments
 (0)