jimradford / superputty

The SuperPuTTY Window Manager for putty sessions
https://www.facebook.com/superputty
MIT License
1.9k stars 320 forks source link

DANGEROUS BEHAVIOUR WHEN PRESS ENTER AT COMMAND TOOLBAR WITH HISTORY ACTIVATED. #931

Open fdelcastillo-calimaco opened 4 months ago

fdelcastillo-calimaco commented 4 months ago

Describe the bug If you have enabled the history option with 1 or more days configured, and you are using dangerous commands like "rm" or "rm -fr", and at any moment you need, press enter with out any command, to only insert the enter without running anything, then any of the saved commands are randomly launched and executed. If that command is "rm" it could be a very big problem.

To Reproduce Steps to reproduce the behavior: 1.- Activate the history. Set a number of 1 or high for days. 2.- Open a ssh connection. 3.- Launch 1 or 2 linux commands. BE CAREFULL, inoffensive commands like pwd or ls. Be sure you are not using rm or rm -fr to check it and you are inside a test directory and not the / . 4.- Press enter at the "commads" toolbar and you can see how pwd or ls are launched instead of the return.

Expected behavior Only insert the enter/return to the shell/cmd and DON'T RUN ANY COMMAND.

Desktop (please complete the following information):

Thanks in advance.