From d387ed59f60572f126274e0ece1505160b85c0ae Mon Sep 17 00:00:00 2001 From: Nils Rokita <0rokita@informatik.uni-hamburg.de> Date: Sun, 8 Dec 2019 18:58:54 +0100 Subject: [PATCH] fix spam validation on bad signature --- bitpoll/poll/spam_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitpoll/poll/spam_util.py b/bitpoll/poll/spam_util.py index 1eae05f9..79dc72cf 100644 --- a/bitpoll/poll/spam_util.py +++ b/bitpoll/poll/spam_util.py @@ -48,7 +48,7 @@ def check_anti_spam_challange(key: str, answer: str, poll_id: int) -> bool: if spam_data.get('type') != 'anti_spam': raise ValidationError(_("Error while checking response")) except BadSignature: - raise ValueError(_("Error while checking response")) + raise ValidationError(_("Error while checking response")) if spam_data['poll_id'] != poll_id: raise ValidationError(_("Error while checking response")) if spam_data['time'] <= time.time() - django_settings.ANTI_SPAM_CHALLENGE_TTL: