Bug 218431 - Terminal following path can be dangerous
Summary: Terminal following path can be dangerous
Status: RESOLVED DUPLICATE of bug 161637
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-12 21:00 UTC by g111
Modified: 2009-12-13 00:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description g111 2009-12-12 21:00:38 UTC
Version:           1.3 (using KDE 4.3.4)
OS:                Linux
Installed from:    Debian testing/unstable Packages

If you open the terminal inside of dolphin it follows to the current path when the user changes it by executing a "cd PATH" command.

This can be dangerous because if something is already typed on the command line, the "cd PATH" is added to the line and the whole line is executed.

Test: Type "echo " on the command line of the internal terminal and then change the path in dolphin. Result:

gert@oink:/tmp$ echo cd /tmp/kde-gert
cd /tmp/kde-gert
gert@oink:/tmp$

Now think of something different then a simple "echo ". Maybe a "rm -r ".

I can think of four solutions:
a) Check if the command line is empty. If it is not then do not change the path but leave the command line untouched.

b) If this is possible: If the command line is not empty, copy the command line and erase it (or cancel it like pressing CTRL+C manually). Change the path. Paste the previous command line to the terminal again.

c) If a) and b) are not possible to implement, always send a CTRL+C first to cancel a possibly none empty line and then execute the cd command on this empty line.

Additionally:
d) Never switch the path automatically. Instead offer a button in the head line of the terminal like "Change to current path". This can be combined with b) or c). Also combining it with a) could be possible (Inactivate the button if something is typed on the command line).

Bye,
Gert
Comment 1 Dario Andres 2009-12-13 00:14:09 UTC
This is being tracked at bug 161637. Thanks

*** This bug has been marked as a duplicate of bug 161637 ***