| Summary: | Unquoted/unescaped directory name passed to "cd" command in dolphin embedded terminal | ||
|---|---|---|---|
| Product: | [Applications] dolphin | Reporter: | Juliano F. Ravasi <bugs+kde> |
| Component: | general | Assignee: | Peter Penz <peter.penz19> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | kde |
| Priority: | NOR | Keywords: | junior-jobs |
| Version First Reported In: | 16.12.2 | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Juliano F. Ravasi
2009-12-25 21:12:18 UTC
After doing some more tests, '!' has the same problem. Most interactive shells use '!' as a history recall shortcut. To reproduce: 1. Create a directory named "!!". 2. Change to it. 3. See what happens in the terminal. While you are at it, it should also be a good idea to add '~' to the list of characters that trigger quoting. Recap: add '[', ']', '!' and '~' to the characters in the directory name that trigger the quoting of the parameter to 'cd' sent to the terminal. i will try to look into this bug i created a patch adding ~ ! [ and ] to the special letters:
can someone review and tell me if i can commit ?
Index: kdecore/util/kshell_unix.cpp
===================================================================
--- kdecore/util/kshell_unix.cpp (révision 1074635)
+++ kdecore/util/kshell_unix.cpp (copie de travail)
-265,9 +265,9 @@
inline static bool isSpecial( QChar cUnicode )
{
static const uchar iqm[] = {
- 0xff, 0xff, 0xff, 0xff, 0xdd, 0x07, 0x00, 0xd8,
- 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x38
- }; // 0-32 \'"$`<>|;&(){}*?#
+ 0xff, 0xff, 0xff, 0xff, 0xdf, 0x07, 0x00, 0xd8,
+ 0x00, 0x00, 0x00, 0x38, 0x01, 0x00, 0x00, 0x78
+ }; // 0-32 \'"$`<>|;&(){}*?#!~[]
uint c = cUnicode.unicode ();
return (c < sizeof(iqm) * 8) && (iqm[c / 8] & (1 << (c & 7)));
Thanks a lot Nicolas. Might it be possible that you submit your patch at the review board (http://reviewboard.kde.org)? The patch looks good IMO, but it would be good if more kde-core developers have a look on this... Thank you! i just created a request : http://reviewboard.kde.org/r/2703/ SVN commit 1081242 by nlecureuil: quote the tilde, square brackets and the exclamation mark Add square brackets as meta Reviewed: http://reviewboard.kde.org/r/2703/ BUG:220092 M +5 -5 kshell_unix.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1081242 |