Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special characters in .env variables not correctly escaped #78014

Closed
alsteven opened this issue Jul 26, 2019 · 3 comments · Fixed by #82704
Closed

Special characters in .env variables not correctly escaped #78014

alsteven opened this issue Jul 26, 2019 · 3 comments · Fixed by #82704
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@alsteven
Copy link

Essentially the same as issue #50302, seems like you missed escaping a character.

  • VSCode Version: 1.36.1
  • OS Version: Windows 10

Steps to Reproduce:

  1. Set up any python project
  2. Create a .env file with BUG=HELLO>LOOKAFILE
  3. Start debugging

The ">" character is not correctly escaped and will cause a file that begins with "LOOKAFILE" to be created in the current directory.

@alsteven
Copy link
Author

I should point out that because you are escaping the escape character (^), I can't even easily work around this, since my attempt to escape ">" by using "^>" gets turned into "^^>"

These are the characters you need to escape:
<, >, |, &, ^

Reference: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/set_1

@alsteven
Copy link
Author

This fix indeed didn't go far enough:
2ff1c7d

Someone just needs to change line 277 of src/vs/workbench/parts/debug/node/terminals.ts please.

Need to add escaping for three additional chars: |, < and >

@weinand weinand added debug Debug viewlet, configurations, breakpoints, adapter issues bug Issue identified by VS Code Team member as probable bug labels Oct 15, 2019
@weinand weinand added this to the October 2019 milestone Oct 15, 2019
@sksaifuddin
Copy link
Contributor

I found the issue. Working on it, will create a PR soon

weinand added a commit that referenced this issue Oct 17, 2019
…acter

Fix #78014 Added Capability to escape |, < and >in addition to & and ^
@connor4312 connor4312 added the verified Verification succeeded label Oct 30, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants