Projects
Kolab:Winterfell
pykolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 14
View file
pykolab.spec
Changed
@@ -38,6 +38,7 @@ Source1: pykolab.logrotate Patch0001: 0001-Use-the-correct-constants-import-and-__version__-val.patch +Patch0002: 0002-ID-directly-after-authentication-before-asking-for-a.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch @@ -232,6 +233,7 @@ %setup -q %patch0001 -p1 +%patch0002 -p1 %build autoreconf -v || automake --add-missing && autoreconf -v
View file
0001-Use-the-correct-constants-import-and-__version__-val.patch
Changed
@@ -1,8 +1,8 @@ From f251c62827c1696dd2e0369800c82cc569c57011 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> Date: Fri, 1 Jul 2016 16:31:50 +0200 -Subject: [PATCH] Use the correct constants import and __version__ value from - it +Subject: [PATCH 1/2] Use the correct constants import and __version__ value + from it --- pykolab/imap/cyrus.py | 4 ++--
View file
0002-ID-directly-after-authentication-before-asking-for-a.patch
Added
@@ -0,0 +1,80 @@ +From 132ea08148dfb903af3bffa1a2f74c7145a6e504 Mon Sep 17 00:00:00 2001 +From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> +Date: Mon, 4 Jul 2016 09:36:48 +0200 +Subject: [PATCH 2/2] ID directly after authentication, before asking for admin + or hierarchy separators + +--- + cyruslib.py | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/cyruslib.py b/cyruslib.py +index 3802c00..9e42f39 100644 +--- a/cyruslib.py ++++ b/cyruslib.py +@@ -130,7 +130,7 @@ class IMAP4(imaplib.IMAP4): + + def id(self): + try: +- typ, dat = self._simple_command('ID', 'NIL') ++ typ, dat = self._simple_command('ID', '("name" "PyKolab/Kolab")') + res, dat = self._untagged_response(typ, dat, 'ID') + except: + return False, dat[0] +@@ -211,7 +211,7 @@ class IMAP4_SSL(imaplib.IMAP4_SSL): + + def id(self): + try: +- typ, dat = self._simple_command('ID', 'NIL') ++ typ, dat = self._simple_command('ID', '("name" "PyKolab/Kolab")') + res, dat = self._untagged_response(typ, dat, 'ID') + except: + return False, dat[0] +@@ -275,6 +275,7 @@ class IMAP4_SSL(imaplib.IMAP4_SSL): + encoded = b2a_base64("%s\0%s\0%s" % (admin, admin, password)).strip() + + res, data = self._simple_command('AUTHENTICATE', 'PLAIN', encoded) ++ self.AUTH = True + if ok(res): + self.state = 'AUTH' + return res, data +@@ -409,8 +410,11 @@ class CYRUS: + self.__doexception("LOGIN", self.ERROR.get("AUTH")[1]) + try: + res, msg = self.m.login(username, password) ++ self.AUTH = True ++ self.id() + admin = self.m.isadmin() + except Exception, info: ++ self.AUTH = False + error = str(info).split(':').pop().strip() + self.__doexception("LOGIN", error) + +@@ -418,7 +422,6 @@ class CYRUS: + self.ADMIN = username + + self.SEP = self.m.getsep() +- self.AUTH = True + self.__verbose( '[LOGIN %s] %s: %s' % (username, res, msg[0]) ) + + def login_plain(self, username, password, asUser = None): +@@ -430,6 +433,8 @@ class CYRUS: + self.__verbose( '[AUTHENTICATE PLAIN %s] %s: %s' % (username, res, msg[0]) ) + + if ok(res): ++ self.AUTH = True ++ self.id() + if asUser is None: + if self.m.isadmin(): + self.ADMIN = admin +@@ -437,7 +442,6 @@ class CYRUS: + self.ADMIN = asUser + self.AUSER = asUser + self.SEP = self.m.getsep() +- self.AUTH = True + + def logout(self): + try: +-- +2.5.5 +
View file
debian.series
Changed
@@ -1,1 +1,3 @@ cyrus-imapd.conf-cert-paths.patch -p1 +0001-Use-the-correct-constants-import-and-__version__-val.patch -p1 +0002-ID-directly-after-authentication-before-asking-for-a.patch -p1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.