Bug 219429 - Dolphin terminal directory change is potentially dangerous
Summary: Dolphin terminal directory change is potentially dangerous
Status: RESOLVED DUPLICATE of bug 161637
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-20 15:17 UTC by Alex Richardson
Modified: 2009-12-20 20:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Richardson 2009-12-20 15:17:36 UTC
Version:            (using Devel)
Compiler:          GCC 4.4 
OS:                Linux
Installed from:    Compiled sources

Since the way dolphin changes the terminal directory is by send cd + dirname to the terminal, this is potentially dangerous/sometimes annoying.
Imagine someone aliases "rm -rf" with "abcd", types "ab" then changes directory in dolphin (e.g. to /), his complete disk will be wiped (of course assuming he has the rights to do this).
This fact allows any command ending in cd to be executed by mistake.

I had a look into the code to try and fix it, but the terminalinterface is too limiting. The ideal solution would be IMHO to save the currently entered text, the send the cd and then input the saved text again (without sending it as a command). It seems to me that this is only achievable by extending the terminalinterface with methods to get the current text, clear it, and one to append text to the current text. It would also be nice to make the main view follow the current working directory of the terminal, but I should probably open another bug for that.
Comment 1 Dario Andres 2009-12-20 20:31:41 UTC
This is being tracked at bug 161637. Thanks

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