summaryrefslogtreecommitdiffstats
path: root/deskutils
diff options
context:
space:
mode:
authorlofi <lofi@FreeBSD.org>2004-02-05 14:31:35 +0000
committerlofi <lofi@FreeBSD.org>2004-02-05 14:31:35 +0000
commit282c1d60f5ff14b6981e21d9486ee2b0b83b7cf8 (patch)
treee1eddd4759a46d9a2132a98efaee486de2adde9b /deskutils
parente64b3469be261861a3f0e3029d8c1e8f7d29c1ea (diff)
downloadFreeBSD-ports-282c1d60f5ff14b6981e21d9486ee2b0b83b7cf8.zip
FreeBSD-ports-282c1d60f5ff14b6981e21d9486ee2b0b83b7cf8.tar.gz
Fix a rather nasty bug in kmail's IMAP
implementation. Bump PORTREVISION. More info: http://lists.kde.org/?l=kde-cvs&m=107588505207720&w=2
Diffstat (limited to 'deskutils')
-rw-r--r--deskutils/kdepim3/Makefile1
-rw-r--r--deskutils/kdepim3/files/patch-kmail-kmfilter.cpp44
-rw-r--r--deskutils/kdepim3/files/patch-kmail-kmfolderimap.cpp33
-rw-r--r--deskutils/kdepim4/Makefile1
-rw-r--r--deskutils/kdepim4/files/patch-kmail-kmfilter.cpp44
-rw-r--r--deskutils/kdepim4/files/patch-kmail-kmfolderimap.cpp33
-rw-r--r--deskutils/kdepim44/Makefile1
-rw-r--r--deskutils/kdepim44/files/patch-kmail-kmfilter.cpp44
-rw-r--r--deskutils/kdepim44/files/patch-kmail-kmfolderimap.cpp33
9 files changed, 234 insertions, 0 deletions
diff --git a/deskutils/kdepim3/Makefile b/deskutils/kdepim3/Makefile
index 26596ad..8cd890f 100644
--- a/deskutils/kdepim3/Makefile
+++ b/deskutils/kdepim3/Makefile
@@ -7,6 +7,7 @@
PORTNAME= kdepim
PORTVERSION= ${KDE_VERSION}
+PORTREVISION= 1
CATEGORIES= deskutils mail news kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src
diff --git a/deskutils/kdepim3/files/patch-kmail-kmfilter.cpp b/deskutils/kdepim3/files/patch-kmail-kmfilter.cpp
new file mode 100644
index 0000000..a2f2395
--- /dev/null
+++ b/deskutils/kdepim3/files/patch-kmail-kmfilter.cpp
@@ -0,0 +1,44 @@
+--- kmail/kmfilter.cpp.orig Sun Nov 30 10:49:22 2003
++++ kmail/kmfilter.cpp Thu Feb 5 13:33:53 2004
+@@ -147,9 +147,18 @@
+ // that the pattern is purified.
+ mPattern.readConfig(config);
+
+- if (bPopFilter)
++ if (bPopFilter) {
+ // get the action description...
+- mAction = (KMPopFilterAction) config->readNumEntry( "action" );
++ QString action = config->readEntry( "action" );
++ if ( action == "down" )
++ mAction = Down;
++ else if ( action == "later" )
++ mAction = Later;
++ else if ( action == "delete" )
++ mAction = Delete;
++ else
++ mAction = NoAction;
++ }
+ else {
+ QStringList sets = config->readListEntry("apply-on");
+ if ( sets.isEmpty() && !config->hasKey("apply-on") ) {
+@@ -210,7 +219,19 @@
+ mPattern.writeConfig(config);
+
+ if (bPopFilter) {
+- config->writeEntry( "action", mAction );
++ switch ( mAction ) {
++ case Down:
++ config->writeEntry( "action", "down" );
++ break;
++ case Later:
++ config->writeEntry( "action", "later" );
++ break;
++ case Delete:
++ config->writeEntry( "action", "delete" );
++ break;
++ default:
++ config->writeEntry( "action", "" );
++ }
+ } else {
+ QStringList sets;
+ if ( bApplyOnInbound )
diff --git a/deskutils/kdepim3/files/patch-kmail-kmfolderimap.cpp b/deskutils/kdepim3/files/patch-kmail-kmfolderimap.cpp
new file mode 100644
index 0000000..c27ffe4
--- /dev/null
+++ b/deskutils/kdepim3/files/patch-kmail-kmfolderimap.cpp
@@ -0,0 +1,33 @@
+--- kmail/kmfolderimap.cpp.orig Sat Jan 17 13:55:08 2004
++++ kmail/kmfolderimap.cpp Thu Feb 5 13:33:38 2004
+@@ -1207,7 +1207,16 @@
+ {
+ KURL url = mAccount->getUrl();
+ KMFolderImap *msg_parent = static_cast<KMFolderImap*>(msg->parent());
+- url.setPath(msg_parent->imapPath() + ";UID=" + msg->headerField("X-UID"));
++ QString uid = msg->headerField("X-UID");
++ /* If the uid is empty the delete job below will nuke all mail in the
++ folder, so we better safeguard against that. See ::expungeFolder, as
++ to why. :( */
++ if ( uid.isEmpty() ) {
++ kdDebug( 5006 ) << "KMFolderImap::deleteMessage: Attempt to delete "
++ "an empty UID. Aborting." << endl;
++ return;
++ }
++ url.setPath(msg_parent->imapPath() + ";UID=" + uid );
+ if ( mAccount->makeConnection() != ImapAccountBase::Connected )
+ return;
+ KIO::SimpleJob *job = KIO::file_delete(url, FALSE);
+@@ -1228,7 +1237,11 @@
+ KMFolderImap *msg_parent = static_cast<KMFolderImap*>(msgList.first()->parent());
+ for ( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it )
+ {
+- url.setPath(msg_parent->imapPath() + ";UID=" + *it);
++ QString uid = *it;
++ // Don't delete with no uid, that nukes the folder. Should not happen, but
++ // better safe than sorry.
++ if ( uid.isEmpty() ) continue;
++ url.setPath(msg_parent->imapPath() + ";UID=" + uid);
+ if ( mAccount->makeConnection() != ImapAccountBase::Connected )
+ return;
+ KIO::SimpleJob *job = KIO::file_delete(url, FALSE);
diff --git a/deskutils/kdepim4/Makefile b/deskutils/kdepim4/Makefile
index 26596ad..8cd890f 100644
--- a/deskutils/kdepim4/Makefile
+++ b/deskutils/kdepim4/Makefile
@@ -7,6 +7,7 @@
PORTNAME= kdepim
PORTVERSION= ${KDE_VERSION}
+PORTREVISION= 1
CATEGORIES= deskutils mail news kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src
diff --git a/deskutils/kdepim4/files/patch-kmail-kmfilter.cpp b/deskutils/kdepim4/files/patch-kmail-kmfilter.cpp
new file mode 100644
index 0000000..a2f2395
--- /dev/null
+++ b/deskutils/kdepim4/files/patch-kmail-kmfilter.cpp
@@ -0,0 +1,44 @@
+--- kmail/kmfilter.cpp.orig Sun Nov 30 10:49:22 2003
++++ kmail/kmfilter.cpp Thu Feb 5 13:33:53 2004
+@@ -147,9 +147,18 @@
+ // that the pattern is purified.
+ mPattern.readConfig(config);
+
+- if (bPopFilter)
++ if (bPopFilter) {
+ // get the action description...
+- mAction = (KMPopFilterAction) config->readNumEntry( "action" );
++ QString action = config->readEntry( "action" );
++ if ( action == "down" )
++ mAction = Down;
++ else if ( action == "later" )
++ mAction = Later;
++ else if ( action == "delete" )
++ mAction = Delete;
++ else
++ mAction = NoAction;
++ }
+ else {
+ QStringList sets = config->readListEntry("apply-on");
+ if ( sets.isEmpty() && !config->hasKey("apply-on") ) {
+@@ -210,7 +219,19 @@
+ mPattern.writeConfig(config);
+
+ if (bPopFilter) {
+- config->writeEntry( "action", mAction );
++ switch ( mAction ) {
++ case Down:
++ config->writeEntry( "action", "down" );
++ break;
++ case Later:
++ config->writeEntry( "action", "later" );
++ break;
++ case Delete:
++ config->writeEntry( "action", "delete" );
++ break;
++ default:
++ config->writeEntry( "action", "" );
++ }
+ } else {
+ QStringList sets;
+ if ( bApplyOnInbound )
diff --git a/deskutils/kdepim4/files/patch-kmail-kmfolderimap.cpp b/deskutils/kdepim4/files/patch-kmail-kmfolderimap.cpp
new file mode 100644
index 0000000..c27ffe4
--- /dev/null
+++ b/deskutils/kdepim4/files/patch-kmail-kmfolderimap.cpp
@@ -0,0 +1,33 @@
+--- kmail/kmfolderimap.cpp.orig Sat Jan 17 13:55:08 2004
++++ kmail/kmfolderimap.cpp Thu Feb 5 13:33:38 2004
+@@ -1207,7 +1207,16 @@
+ {
+ KURL url = mAccount->getUrl();
+ KMFolderImap *msg_parent = static_cast<KMFolderImap*>(msg->parent());
+- url.setPath(msg_parent->imapPath() + ";UID=" + msg->headerField("X-UID"));
++ QString uid = msg->headerField("X-UID");
++ /* If the uid is empty the delete job below will nuke all mail in the
++ folder, so we better safeguard against that. See ::expungeFolder, as
++ to why. :( */
++ if ( uid.isEmpty() ) {
++ kdDebug( 5006 ) << "KMFolderImap::deleteMessage: Attempt to delete "
++ "an empty UID. Aborting." << endl;
++ return;
++ }
++ url.setPath(msg_parent->imapPath() + ";UID=" + uid );
+ if ( mAccount->makeConnection() != ImapAccountBase::Connected )
+ return;
+ KIO::SimpleJob *job = KIO::file_delete(url, FALSE);
+@@ -1228,7 +1237,11 @@
+ KMFolderImap *msg_parent = static_cast<KMFolderImap*>(msgList.first()->parent());
+ for ( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it )
+ {
+- url.setPath(msg_parent->imapPath() + ";UID=" + *it);
++ QString uid = *it;
++ // Don't delete with no uid, that nukes the folder. Should not happen, but
++ // better safe than sorry.
++ if ( uid.isEmpty() ) continue;
++ url.setPath(msg_parent->imapPath() + ";UID=" + uid);
+ if ( mAccount->makeConnection() != ImapAccountBase::Connected )
+ return;
+ KIO::SimpleJob *job = KIO::file_delete(url, FALSE);
diff --git a/deskutils/kdepim44/Makefile b/deskutils/kdepim44/Makefile
index 26596ad..8cd890f 100644
--- a/deskutils/kdepim44/Makefile
+++ b/deskutils/kdepim44/Makefile
@@ -7,6 +7,7 @@
PORTNAME= kdepim
PORTVERSION= ${KDE_VERSION}
+PORTREVISION= 1
CATEGORIES= deskutils mail news kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src
diff --git a/deskutils/kdepim44/files/patch-kmail-kmfilter.cpp b/deskutils/kdepim44/files/patch-kmail-kmfilter.cpp
new file mode 100644
index 0000000..a2f2395
--- /dev/null
+++ b/deskutils/kdepim44/files/patch-kmail-kmfilter.cpp
@@ -0,0 +1,44 @@
+--- kmail/kmfilter.cpp.orig Sun Nov 30 10:49:22 2003
++++ kmail/kmfilter.cpp Thu Feb 5 13:33:53 2004
+@@ -147,9 +147,18 @@
+ // that the pattern is purified.
+ mPattern.readConfig(config);
+
+- if (bPopFilter)
++ if (bPopFilter) {
+ // get the action description...
+- mAction = (KMPopFilterAction) config->readNumEntry( "action" );
++ QString action = config->readEntry( "action" );
++ if ( action == "down" )
++ mAction = Down;
++ else if ( action == "later" )
++ mAction = Later;
++ else if ( action == "delete" )
++ mAction = Delete;
++ else
++ mAction = NoAction;
++ }
+ else {
+ QStringList sets = config->readListEntry("apply-on");
+ if ( sets.isEmpty() && !config->hasKey("apply-on") ) {
+@@ -210,7 +219,19 @@
+ mPattern.writeConfig(config);
+
+ if (bPopFilter) {
+- config->writeEntry( "action", mAction );
++ switch ( mAction ) {
++ case Down:
++ config->writeEntry( "action", "down" );
++ break;
++ case Later:
++ config->writeEntry( "action", "later" );
++ break;
++ case Delete:
++ config->writeEntry( "action", "delete" );
++ break;
++ default:
++ config->writeEntry( "action", "" );
++ }
+ } else {
+ QStringList sets;
+ if ( bApplyOnInbound )
diff --git a/deskutils/kdepim44/files/patch-kmail-kmfolderimap.cpp b/deskutils/kdepim44/files/patch-kmail-kmfolderimap.cpp
new file mode 100644
index 0000000..c27ffe4
--- /dev/null
+++ b/deskutils/kdepim44/files/patch-kmail-kmfolderimap.cpp
@@ -0,0 +1,33 @@
+--- kmail/kmfolderimap.cpp.orig Sat Jan 17 13:55:08 2004
++++ kmail/kmfolderimap.cpp Thu Feb 5 13:33:38 2004
+@@ -1207,7 +1207,16 @@
+ {
+ KURL url = mAccount->getUrl();
+ KMFolderImap *msg_parent = static_cast<KMFolderImap*>(msg->parent());
+- url.setPath(msg_parent->imapPath() + ";UID=" + msg->headerField("X-UID"));
++ QString uid = msg->headerField("X-UID");
++ /* If the uid is empty the delete job below will nuke all mail in the
++ folder, so we better safeguard against that. See ::expungeFolder, as
++ to why. :( */
++ if ( uid.isEmpty() ) {
++ kdDebug( 5006 ) << "KMFolderImap::deleteMessage: Attempt to delete "
++ "an empty UID. Aborting." << endl;
++ return;
++ }
++ url.setPath(msg_parent->imapPath() + ";UID=" + uid );
+ if ( mAccount->makeConnection() != ImapAccountBase::Connected )
+ return;
+ KIO::SimpleJob *job = KIO::file_delete(url, FALSE);
+@@ -1228,7 +1237,11 @@
+ KMFolderImap *msg_parent = static_cast<KMFolderImap*>(msgList.first()->parent());
+ for ( QStringList::Iterator it = sets.begin(); it != sets.end(); ++it )
+ {
+- url.setPath(msg_parent->imapPath() + ";UID=" + *it);
++ QString uid = *it;
++ // Don't delete with no uid, that nukes the folder. Should not happen, but
++ // better safe than sorry.
++ if ( uid.isEmpty() ) continue;
++ url.setPath(msg_parent->imapPath() + ";UID=" + uid);
+ if ( mAccount->makeConnection() != ImapAccountBase::Connected )
+ return;
+ KIO::SimpleJob *job = KIO::file_delete(url, FALSE);
OpenPOWER on IntegriCloud