mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
Ticket #3253: unexpected command line execution from Quick View panel.
When panel is set to 'Quick view' mode, some keys are handled by mvciewer, and unhandled keys are passed to the command line. This is very dangerous since user can easily type and execute a harmful command. 1st step: * (mcview_callback): don't pass any keys from mcviewer in QuickView mode to the command line. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
f5295f790b
commit
8469c13f38
@ -672,7 +672,8 @@ mcview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *
|
||||
case MSG_KEY:
|
||||
i = mcview_handle_key (view, parm);
|
||||
mcview_update (view);
|
||||
return i;
|
||||
/* don't pass any chars to command line in QuickView mode */
|
||||
return mcview_is_in_panel (view) ? MSG_HANDLED : i;
|
||||
|
||||
case MSG_ACTION:
|
||||
i = mcview_execute_cmd (view, parm);
|
||||
|
Loading…
Reference in New Issue
Block a user