-
Notifications
You must be signed in to change notification settings - Fork 37.4k
Description
- VSCode Version: 1.53.0 (commit id: 8490d3d)
- OS Version: Ubuntu 20.04.2 LTS (Kernel: Linux 5.4.0-65-generic)
I stumbled upon this bug by accident when I had the contents of some large file in my clipboard and (not realizing I had these file contents in the clipboard) when I pasted it in the filename of the file explorer of VSCode, it became unresponsive to the point I had to force kill it. In my opinion it is not very critical, not many people with encounter this issue, it was just surprising that my vscode became unresponsive due to this. I tried to locate the source of the issue in the code, but I couldn't find it myself.
Steps to Reproduce:
- open a directory in VSCode such that you have some file existing in the Explorer
- copy some filename with many dots to the clipboard. I use
python -c "print('a.' * 50000)" | xclip -sel clipfor this - select the file and click rename
F2, followed byCTRL-Vto paste the string - observe vscode is unresponsive for more than 30 seconds, after which I force kill it.
I found out that when you would paste 100.000 characters without using dots (i.e. python -c "print('ab' * 50000)" | xclip -sel clip), then VSCode responds very quickly and lets me know the filename is invalid.
Since the maximum allowed length of a filename is 255 characters, I think it would suffice to limit the filename to 255 characters before any further parsing is done.
Does this issue occur when all extensions are disabled?: Yes / no