Ticket #2987 (closed defect: duplicate)

Opened 7 years ago

Last modified 3 years ago

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

  1. Hide panels (Ctrl+O)
  2. Type command kdialog --msgbox "Ops" but do not press enter.
  3. Restore panels (Ctrl+O)
  4. Note that command prompt is empty
  5. Choose directory from panel and try to enter it using keyboard
  6. 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:

  1. mkdir foo
  2. cd foo
  3. echo hello world > bar
  4. echo something else > other-file
  5. mc
  6. ctrl+o
  7. type "rm -fr bar ", do not press enter
  8. ctrl+o, ... hey, how was that file named?
  9. pres enter to go to parent directory
  10. realize mistake, pres enter again and look at the name of 'other-file'
  11. ctrl+o
  12. 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

comment:1 Changed 7 years ago by andrew_b

  • Status changed from new to closed
  • Resolution set to duplicate

Duplicate of #2110.

comment:2 Changed 3 years ago by andrew_b

  • Milestone Future Releases deleted
Note: See TracTickets for help on using tickets.