2 commits - pykolab/auth wallace/module_invitationpolicy.py
Thomas Brüderli
bruederli at kolabsys.com
Thu Apr 2 13:03:52 CEST 2015
pykolab/auth/ldap/__init__.py | 3 ++-
wallace/module_invitationpolicy.py | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 4bbbb5c3817b23b1c15b364761a6ab89bd247dbb
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Sat Mar 28 03:51:24 2015 +0100
Escape filter value when searching LDAP entries by attribute (#4924)
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index fa01993..f823d46 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -21,6 +21,7 @@ import _ldap
import ldap
import ldap.async
import ldap.controls
+import ldap.filter
import logging
import time
@@ -964,7 +965,7 @@ class LDAP(pykolab.base.Base):
def search_entry_by_attribute(self, attr, value, **kw):
self._bind()
- _filter = "(%s=%s)" % (attr, value)
+ _filter = "(%s=%s)" % (attr, ldap.filter.escape_filter_chars(value))
config_base_dn = self.config_get('base_dn')
ldap_base_dn = self._kolab_domain_root_dn(self.domain)
commit ef305bbbb48e7136ea8b81972395af779c1c12df
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Fri Mar 27 19:51:09 2015 +0100
Don't change partstat on new invitations saved to calendar (#4948)
diff --git a/wallace/module_invitationpolicy.py b/wallace/module_invitationpolicy.py
index ca7aba5..fea5ec8 100644
--- a/wallace/module_invitationpolicy.py
+++ b/wallace/module_invitationpolicy.py
@@ -428,7 +428,9 @@ def process_itip_request(itip_event, policy, recipient_email, sender_email, rece
log.debug(_("Precondition for object %r fulfilled: %r") % (itip_event['uid'], condition_fulfilled), level=5)
- respond_with = None
+ if existing:
+ respond_with = None
+
if policy & ACT_ACCEPT and condition_fulfilled:
respond_with = 'TENTATIVE' if policy & COND_TENTATIVE else 'ACCEPTED'
@@ -475,7 +477,7 @@ def process_itip_request(itip_event, policy, recipient_email, sender_email, rece
elif policy & ACT_SAVE_TO_FOLDER:
# copy the invitation into the user's default folder with PARTSTAT=NEEDS-ACTION
- itip_event['xml'].set_attendee_participant_status(receiving_attendee, 'NEEDS-ACTION')
+ itip_event['xml'].set_attendee_participant_status(receiving_attendee, respond_with or 'NEEDS-ACTION')
save_object = True
else:
More information about the commits
mailing list