Configuration variables: unsafe file path usage
See original GitHub issueThe variableResolver
seems to have a few variables that are derived based on the currently active editor:
The file path casing can be anything and must not necessarily match the casing on disk. As such I think the variables relativeFile
and relativeFileDirname
need to use the IURIIdentityService
to compute the relative paths here:
and
//cc @jrieken
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Safe File Variables (GNU Emacs Manual)
File -local variables can be dangerous; when you visit someone else's file, there's no telling what its local variables list could do to...
Read more >File path formats on Windows systems | Microsoft Learn
Relative paths are dangerous in multithreaded applications (that is, most applications) because the current directory is a per-process setting.
Read more >I cannot add the parent directory to *safe.directory* in Git
git config --global --add safe.directory F:/GitHub/my-project ... of copy/pasting files, would be to make Visual Studio use the global ...
Read more >Danger of setting the environment variable 'PATH' with a '.'?
on the path, especially as the first place to search is dangerous ... likely to inadvertantly execute (for example by creating a file...
Read more >Path Traversal | OWASP Foundation
By manipulating variables that reference files with “dot-dot-slash (../)” sequences and its variations or by using absolute file paths, it may be possible ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Only @aeschli knows, he wrote those utils and I didn’t change their semantics when moving them to
IExtUri
. But, yeah it seems that there is some scheme and platform specific handling in there and I don’t think that is good.I opened https://github.com/microsoft/vscode/issues/108256