[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    [Kde-pim] [patch] fix improper seperator in ACL lists
From:       Carsten Wolff <wolff () kde ! org>
Date:       2008-05-06 19:29:52
Message-ID: 200805062129.58808.wolff () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


(please reply to all, I'm not subscribed)

Hi!

At the Debian groupware meeting last month, Wilfried from citadel.org 
mentioned to me the fact, that Citadel would work well as a Kolab1 server for 
Kontact, if it wasn't for messed up ACL-lists in KMail when userids with 
spaces in them are involved. Attached is a patch for KDEPIM3.5.9 to fix that.

Whoever wrote the ACL-Code in kio_imap4, wrote in his code-comment, that he 
thought spaces weren't allowed in userids and so he used it as a seperator. 
It seems to me though, that Citadel is right to allow spaces in userids, 
because I can't find anything against that in rfc3501.txt.

The RFC states double-quotes are a forbidden character though, so I used it in 
my patch instead.

I'm not sure to commit though, because I don't know if any app besides KMail 
uses kio_imap4 and I don't want to break any such program. What do you think? 
Is it safe to commit?

Greetings,
Carsten
-- 
           /\- ´-/\
          (  @ @  )
________o0O___^___O0o________	

["imap_acl_handle_userid_with_blank.diff" (text/x-diff)]

diff -ur kdepim-3.5.9.orig/kioslaves/imap4/imap4.cc kdepim-3.5.9/kioslaves/imap4/imap4.cc
--- kdepim-3.5.9.orig/kioslaves/imap4/imap4.cc	2008-02-13 10:39:38.000000000 +0100
+++ kdepim-3.5.9/kioslaves/imap4/imap4.cc	2008-05-06 20:34:41.000000000 +0200
@@ -1496,7 +1496,7 @@
     // limits me to a string instead of a stringlist. I'm using space as separator,
     // since I don't think it can be used in login names.
     kdDebug(7116) << getResults() << endl;
-    infoMessage(getResults().join( " " ));
+    infoMessage(getResults().join( "\"" ));
     finished();
     break;
   }
diff -ur kdepim-3.5.9.orig/kmail/acljobs.cpp kdepim-3.5.9/kmail/acljobs.cpp
--- kdepim-3.5.9.orig/kmail/acljobs.cpp	2007-10-08 11:50:38.000000000 +0200
+++ kdepim-3.5.9/kmail/acljobs.cpp	2008-05-06 20:32:44.000000000 +0200
@@ -175,7 +175,7 @@
 void ACLJobs::GetACLJob::slotInfoMessage( KIO::Job*, const QString& str )
 {
   // Parse the result
-  QStringList lst = QStringList::split( " ", str, true );
+  QStringList lst = QStringList::split( "\"", str, true );
   while ( lst.count() >= 2 ) // we take items 2 by 2
   {
     QString user = lst.front(); lst.pop_front();

["signature.asc" (application/pgp-signature)]

_______________________________________________
KDE PIM mailing list kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic