Summary: | Konqueror crashes if a string containing '#' and a letter is pasted into the window with a middle-click | ||
---|---|---|---|
Product: | [Unmaintained] kio | Reporter: | Daniel Dumitrache <daniel.dumitrache> |
Component: | general | Assignee: | David Faure <faure> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | frank78ac |
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Daniel Dumitrache
2008-09-15 19:28:53 UTC
Thanks for the bug report. I can confirm this in 4.1.1 and trunk rev. 861285. It seems to crash for any string that contains a '#' and a letter for me. The failed assertion ASSERT: "result.second" in file /home/kde-devel/kde/src/KDE/kdelibs/kio/kio/kdirmodel.cpp, line 308 is reported. This looks just like the thing I found a while ago in http://bugs.kde.org/show_bug.cgi?id=104585#c10. Actually, this seems to be related to quite a lot of bugs. These all look like duplicates to me: Bug 160057, bug 160070, bug 167349, bug 169436, bug 170317, bug 170695. But maybe I'm wrong and there's a reason why nobody has marked them yet? The backtrace I get for bug 160057 is really identical, I'm marking this as a duplicate. *** This bug has been marked as a duplicate of bug 160057 *** I'm reopening this because it's actually not a duplicate. This needs to be fixed separately for each kioslave (see David's comment in the other bug report). Sorry about the confusion! This patches fixes it, but is only valid if no kioslave ever cares for query (?foo) or ref (#ref) in its listDir implementation. In general that's the case... well, kio_imap uses the query in listDir, but that's for special usage by kmail, not in konqueror I think. Otherwise we need to fix every slave to do a redirect to the url without query nor ref, but this sounds like a lot of trouble for a corner case. --- kdirlister.cpp (revision 865118) +++ kdirlister.cpp (working copy) @@ -100,6 +100,8 @@ bool KDirListerCache::listDir( KDirListe // like this we don't have to worry about trailing slashes any further KUrl _url(_u); _url.cleanPath(); // kill consecutive slashes + _url.setQuery(QString()); // kill query + _url.setRef(QString()); // kill ref (#171117) _url.adjustPath(KUrl::RemoveTrailingSlash); const QString urlStr = _url.url(); That was a bad patch, some ioslaves care about the query, like svn:// (bug 169436). Fixed better now. Trunk r865989+865992, branch r865995. |