diff --git a/CHANGES.txt b/CHANGES.txt index 885b89f..aa2da65 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,12 +1,17 @@ Changelog ========= -1.0b6 (unreleased) +1.0b6 (2010-08-05) ------------------ * Catch Type errors in indexers if object can not be adapted to IDiscussion [do3cc] +* Call the CaptchaValidator even when no captcha data was submitted. This is + necessary to ensure that the collective.akismet validator is called when installed. + [timo] + + 1.0b5 (2010-07-16) ------------------ diff --git a/plone/app/discussion/browser/comments.py b/plone/app/discussion/browser/comments.py index 1a9f38a..e2494fb 100644 --- a/plone/app/discussion/browser/comments.py +++ b/plone/app/discussion/browser/comments.py @@ -111,17 +111,14 @@ class CommentForm(extensible.ExtensibleForm, form.Form): settings = registry.forInterface(IDiscussionSettings) portal_membership = getToolByName(self.context, 'portal_membership') if settings.captcha != 'disabled' and portal_membership.isAnonymousUser(): - if 'captcha' in data: - # Check Captcha only if there is a value, otherwise - # the default "required" validator is sufficient. - captcha = CaptchaValidator(self.context, - self.request, - None, - ICaptcha['captcha'], - None) - captcha.validate(data['captcha']) - else: - return + if not 'captcha' in data: + data['captcha'] = u"" + captcha = CaptchaValidator(self.context, + self.request, + None, + ICaptcha['captcha'], + None) + captcha.validate(data['captcha']) if 'title' in data: title = data['title']