Hello community,
here is the log from the commit of package kbiff
checked in at Fri Oct 13 16:18:24 CEST 2006.
--------
--- KDE/kbiff/kbiff.changes 2006-01-25 21:32:59.000000000 +0100
+++ /mounts/work_src_done/STABLE/kbiff/kbiff.changes 2006-10-13 13:34:33.000000000 +0200
@@ -1,0 +2,5 @@
+Fri Oct 13 13:33:58 CEST 2006 - wstephenson@suse.de
+
+- Allow user to disable APOP if required (#207626)
+
+-------------------------------------------------------------------
New:
----
kbiff-disable-apop.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kbiff.spec ++++++
--- /var/tmp/diff_new_pack.EZWVRy/_old 2006-10-13 16:17:26.000000000 +0200
+++ /var/tmp/diff_new_pack.EZWVRy/_new 2006-10-13 16:17:26.000000000 +0200
@@ -1,11 +1,11 @@
#
# spec file for package kbiff (Version 3.8)
#
-# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
-# Please submit bugfixes or comments via http://www.suse.de/feedback/
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
@@ -14,13 +14,14 @@
BuildRequires: kdelibs3-devel
License: LGPL
Group: Productivity/Networking/Email/Utilities
-Summary: An Application to check for new E-Mail
+Summary: An Application to Check for New E-Mail
Version: 3.8
-Release: 3
+Release: 24
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: kbiff-%version.tar.bz2
Patch0: kbiff.diff
Patch1: fix-desktop-file.diff
+Patch2: kbiff-disable-apop.diff
%description
KBiff docks to the KDE panel (Kicker) and shows incoming e-mail.
@@ -35,6 +36,7 @@
%setup -q
%patch0
%patch1
+%patch2
cd po
mv no.po nb.po
mv no_NY.po nn.po
@@ -67,6 +69,8 @@
%{_mandir}/*/*
%changelog -n kbiff
+* Fri Oct 13 2006 - wstephenson@suse.de
+- Allow user to disable APOP if required (#207626)
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Sun Oct 02 2005 - stbinner@suse.de
++++++ kbiff-disable-apop.diff ++++++
? Doxyfile
? build
? kbiff.kdevelop
Index: kbiff/kbiffmonitor.cpp
===================================================================
RCS file: /cvsroot/kbiff/kbiff/kbiff/kbiffmonitor.cpp,v
retrieving revision 1.19
diff -u -5 -d -p -r1.19 kbiffmonitor.cpp
--- kbiff/kbiffmonitor.cpp 2 Jun 2005 03:31:10 -0000 1.19
+++ kbiff/kbiffmonitor.cpp 13 Oct 2006 11:01:57 -0000
@@ -313,10 +313,12 @@ void KBiffMonitor::setMailbox(KBiffURL&
port = (url.port() > 0) ? url.port() : 110;
keepalive = url.searchPar("keepalive") == "yes";
bool async = url.searchPar("async") == "yes";
pop->setAsync(async);
+ bool disableApop = url.searchPar("noapop") == "yes";
+ pop->setApop( !disableApop );
#ifdef USE_SSL
pop->setSSL(false);
#endif // USE_SSL
simpleURL = "pop3://" + server + "/" + mailbox;
@@ -1896,10 +1898,15 @@ void KBiffPop::close()
{
command("QUIT\r\n");
KBiffSocket::close();
}
+void KBiffPop::setApop( bool enabled )
+{
+ disable_apop = !enabled;
+}
+
bool KBiffPop::command(const QString& line)
{
if (writeLine(line) <= 0)
return false;
@@ -1994,11 +2001,11 @@ bool KBiffPop::parseBanner(void)
return false;
}
// Look for the banner part that indicates APOP support
QRegExp rx("(<[a-zA-Z0-9_+.-]+@[a-zA-Z0-9_+.-]+>)");
- if( rx.search(banner) == -1 ) {
+ if( rx.search(banner) == -1 || disable_apop == true ) {
auth_apop = false;
} else {
chall_apop = rx.cap(1).latin1();
auth_apop = true;
}
Index: kbiff/kbiffmonitor.h
===================================================================
RCS file: /cvsroot/kbiff/kbiff/kbiff/kbiffmonitor.h,v
retrieving revision 1.9
diff -u -5 -d -p -r1.9 kbiffmonitor.h
--- kbiff/kbiffmonitor.h 2 Jun 2005 03:24:13 -0000 1.9
+++ kbiff/kbiffmonitor.h 13 Oct 2006 11:01:57 -0000
@@ -154,11 +154,12 @@ public:
void close();
// Parses the banner message in the initial server response
bool parseBanner(void);
-
+ // Set whether to disable APOP authentication
+ void setApop( bool enabled );
/**
* @internal
*
* @brief Encapsulates all authentication to the POP3 server
*
@@ -192,10 +193,15 @@ protected:
/**
* @internal
* @brief the CRAM-MD5 challenge (base64 decoded)
*/
QString chall_cram_md5; // the CRAM-MD5 challenge (base64 decoded)
+ /**
+ * @internal
+ * @brief does the user want APOP authentication
+ */
+ bool disable_apop;
};
/**
* @internal
*/
@@ -500,10 +506,11 @@ private:
QString password;
QString fetchCommand;
unsigned short int port;
bool preauth;
bool keepalive;
+ bool disableApop;
// New state cache
unsigned int new_lastSize;
QDateTime new_lastRead;
QDateTime new_lastModified;
Index: kbiff/setupdlg.cpp
===================================================================
RCS file: /cvsroot/kbiff/kbiff/kbiff/setupdlg.cpp,v
retrieving revision 1.14
diff -u -5 -d -p -r1.14 setupdlg.cpp
--- kbiff/setupdlg.cpp 10 Sep 2005 21:35:05 -0000 1.14
+++ kbiff/setupdlg.cpp 13 Oct 2006 11:01:57 -0000
@@ -3,11 +3,11 @@
* Copyright (C) 1999-2005 Kurt Granroth
*
* This file contains the implementation of the setup dialog
* class for KBiff.
*
- * $Id: setupdlg.cpp,v 1.14 2005/09/10 21:35:05 gran Exp $
+ * $Id: setupdlg.cpp,v 1.1 2006/10/13 09:42:59 wstephenson Exp wstephenson $
*/
#include "setupdlg.h"
#include
#include
@@ -1068,40 +1068,49 @@ KBiffMailboxAdvanced::KBiffMailboxAdvanc
async->setEnabled(false);
whatsthis = i18n(
"If this is checked, then the socket protocols will access "
"the server asynchronously");
QWhatsThis::add(async, whatsthis);
+
+ apop = new QCheckBox(i18n("&Disable APOP"), this);
+ apop->setEnabled(false);
+ whatsthis = i18n(
+ "If this is checked, then POP mailboxes will not use Authenticated POP, "
+ "and send passwords in plaintext over the network, which is a security risk");
+ QWhatsThis::add(apop, whatsthis);
QPushButton *ok = new QPushButton(i18n("&OK"), this);
ok->setDefault(true);
QPushButton *cancel = new QPushButton(i18n("&Cancel"), this);
// connect all the slots to signals
connect(preauth, SIGNAL(toggled(bool)), SLOT(preauthModified(bool)));
connect(keepalive, SIGNAL(toggled(bool)), SLOT(keepaliveModified(bool)));
connect(async, SIGNAL(toggled(bool)), SLOT(asyncModified(bool)));
+ connect(apop, SIGNAL(toggled(bool)), SLOT(apopModified(bool)));
connect(port, SIGNAL(textChanged(const QString&)),
SLOT(portModified(const QString&)));
connect(ok, SIGNAL(clicked()), SLOT(accept()));
connect(cancel, SIGNAL(clicked()), SLOT(reject()));
connect(timeout, SIGNAL(textChanged(const QString&)),
SLOT(timeoutModified(const QString&)));
// NOW DO THE LAYOUT
- QGridLayout *top_layout = new QGridLayout(this, 6, 4, 12);
+ QGridLayout *top_layout = new QGridLayout(this, 7, 4, 12);
top_layout->addWidget(mailbox_label, 0, 0);
top_layout->addMultiCellWidget(mailbox, 0, 0, 1, 3);
top_layout->addWidget(port_label, 1, 0);
top_layout->addWidget(port, 1, 1);
top_layout->addWidget(timeout_label, 1, 2);
top_layout->addWidget(timeout, 1, 3);
top_layout->addWidget(preauth, 2, 1);
top_layout->addWidget(keepalive, 3, 1);
top_layout->addWidget(async, 4, 1);
- top_layout->addWidget(ok, 5, 2);
- top_layout->addWidget(cancel, 5, 3);
+ top_layout->addWidget(apop, 4, 1);
+ top_layout->addWidget(ok, 6, 2);
+ top_layout->addWidget(cancel, 6, 3);
}
KBiffMailboxAdvanced::~KBiffMailboxAdvanced()
{
}
@@ -1180,10 +1189,23 @@ void KBiffMailboxAdvanced::asyncModified
else
url.setSearchPar("async", "no");
setMailbox(url);
}
+void KBiffMailboxAdvanced::apopModified(bool is_apop)
+{
+ KBiffURL url = getMailbox();
+ if ( url.protocol() == "pop3" )
+ {
+ if (is_apop)
+ url.setSearchPar("noapop", "yes");
+ else
+ url.setSearchPar("noapop", "no");
+ setMailbox(url);
+ }
+}
+
void KBiffMailboxAdvanced::setPreauth(bool on)
{
preauth->setEnabled(true);
preauth->setChecked(on);
}
@@ -1198,10 +1220,16 @@ void KBiffMailboxAdvanced::setAsync(bool
{
async->setEnabled(true);
async->setChecked(on);
}
+void KBiffMailboxAdvanced::setApop(bool on)
+{
+ apop->setEnabled(true);
+ apop->setChecked(on);
+}
+
bool KBiffMailboxAdvanced::getPreauth() const
{
return preauth->isChecked();
}
@@ -1524,10 +1552,11 @@ void KBiffMailboxTab::setMailbox(const K
timeout = url.searchPar("timeout").toInt();
preauth = url.searchPar("preauth") == "yes" ? true : false;
keepalive = url.searchPar("keepalive") == "yes" ? true : false;
async = url.searchPar("async") == "yes" ? true : false;
+ disableApop = url.searchPar("noapop") == "yes" ? true : false;
QString fetch = url.searchPar("fetch");
checkFetchCommand->setChecked(!fetch.isEmpty());
editFetchCommand->setText(fetch);
}
@@ -1574,10 +1603,17 @@ const KBiffURL KBiffMailboxTab::getMailb
if (async)
url.setSearchPar("async", "yes");
else
url.setSearchPar("async", "no");
+ if ((prot == "pop3s") || (prot == "pop3") )
+ {
+ if (disableApop)
+ url.setSearchPar("noapop", "yes");
+ else
+ url.setSearchPar("noapop", "no");
+ }
url.setSearchPar("timeout", QString().setNum(timeout));
}
if (checkFetchCommand->isChecked() && !editFetchCommand->text().isEmpty())
url.setSearchPar("fetch", editFetchCommand->text());
@@ -1830,10 +1866,11 @@ void KBiffMailboxTab::advanced()
if ((prot == "pop3") || (prot == "nntp") || (prot == "pop3s"))
{
advanced_dlg.setKeepalive(keepalive);
advanced_dlg.setAsync(async);
+ advanced_dlg.setApop(disableApop);
}
advanced_dlg.setMailbox(getMailbox());
if (advanced_dlg.exec())
{
Index: kbiff/setupdlg.h
===================================================================
RCS file: /cvsroot/kbiff/kbiff/kbiff/setupdlg.h,v
retrieving revision 1.5
diff -u -5 -d -p -r1.5 setupdlg.h
--- kbiff/setupdlg.h 14 Nov 2003 14:45:47 -0000 1.5
+++ kbiff/setupdlg.h 13 Oct 2006 11:01:57 -0000
@@ -3,11 +3,11 @@
* Copyright (C) 1999-2001 Kurt Granroth
*
* This file contains the setup dialog and related widgets
* for KBiff. All user configuration is done here.
*
- * $Id: setupdlg.h,v 1.5 2003/11/14 14:45:47 gran Exp $
+ * $Id: setupdlg.h,v 1.1 2006/10/13 09:42:59 wstephenson Exp wstephenson $
*/
#ifndef SETUPDLG_H
#define SETUPDLG_H
#ifdef HAVE_CONFIG_H
@@ -199,26 +199,29 @@ public:
void setTimeout(unsigned int the_to, bool enable = true);
void setMailbox(const KBiffURL& url);
void setPreauth(bool on);
void setKeepalive(bool on);
void setAsync(bool on);
+ void setApop(bool on);
protected slots:
void portModified(const QString& text);
void timeoutModified(const QString& text);
void preauthModified(bool toggled);
void keepaliveModified(bool toggled);
void asyncModified(bool toggled);
+ void apopModified(bool toggled);
private:
QString password;
QLineEdit *mailbox;
QLineEdit *port;
QLineEdit *timeout;
QCheckBox *preauth;
QCheckBox *keepalive;
QCheckBox *async;
+ QCheckBox *apop;
};
class KBiffMailboxTab : public QWidget
{
Q_OBJECT
@@ -257,10 +260,11 @@ private:
unsigned int port;
unsigned int timeout;
bool preauth;
bool keepalive;
bool async;
+ bool disableApop;
QComboBox *comboProtocol;
QLineEdit *editMailbox;
QLineEdit *editServer;
QLineEdit *editUser;
QLineEdit *editPassword;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org