Ticket #2987 (closed defect: duplicate)
subshell: unexpected command execution
Reported by: | onlyjob | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | mc-core | Version: | 4.8.5 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
Forwarding from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=703741
- Hide panels (Ctrl+O)
- Type command kdialog --msgbox "Ops" but do not press enter.
- Restore panels (Ctrl+O)
- Note that command prompt is empty
- Choose directory from panel and try to enter it using keyboard
- Note that instead of entering directory a command hidden "under panels" was executed.
This is a dangerous situation when command can be accidentally executed.
The following is an original bug report demonstrating loss of data:
####
mc can delete files or execute wierd commands without asking.
How to reproduce:
- mkdir foo
- cd foo
- echo hello world > bar
- echo something else > other-file
- mc
- ctrl+o
- type "rm -fr bar ", do not press enter
- ctrl+o, ... hey, how was that file named?
- pres enter to go to parent directory
- realize mistake, pres enter again and look at the name of 'other-file'
- ctrl+o
- ohh...
I never confirmed the rm command, but file 'bar' is gone...
When mc changes directory in shell, it executes unfinished command. It can
contain anything.
Expected behaviour: Just keep it unchanged and do not change the current
directory, when there is unfinished command.
Change History
Note: See
TracTickets for help on using
tickets.
Duplicate of #2110.