From e651da8b3f205a07e7a4247d11dfcbe6e39986f2 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 15 Feb 2014 17:14:52 +0100 Subject: [PATCH] Enforce strict response for data protection clause. The - legally binding - data protection clause demands an answer of "JA" to show voter agreement for vote processing. Hence UseVote should only accept "JA" (in upper or lower case), but not "DAFUER" or some other synonyms. * Add bdsg_confirm (regexp) to usevote.cfg * Change check in uvvote.pl accordingly Signed-off-by: Thomas Hochstein --- usevote.cfg | 4 ++++ usevote.global.cfg | 4 ++++ uvvote.pl | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/usevote.cfg b/usevote.cfg index cf801f5..360ef4c 100644 --- a/usevote.cfg +++ b/usevote.cfg @@ -267,6 +267,10 @@ enth_stimme = (E|E\s*N\s*T\s*H\s*A\s*L\s*T\s*U\s*N\s*G) # Achtung, sollte auch in den Templates im Bestaetigungstext angepasst werden ann_stimme = A\s*N\s*N\s*U\s*L\s*L\s*I\s*E\s*R\s*U\s*N\s*G +# RegExp fuer Bestaetigung der Datenschutzklause (case-insensitive) +# Standardmaessig wird nur JA erkannt +bdsg_confirm = JA + # Template files (these files are in the template directory defined above) tpl_mailheader = "mailheader" # generally used mail header tpl_bouncelist = "bouncelist" # used by uvbounce.pl diff --git a/usevote.global.cfg b/usevote.global.cfg index beb859f..1118642 100644 --- a/usevote.global.cfg +++ b/usevote.global.cfg @@ -139,6 +139,10 @@ enth_stimme = (E|E\s*N\s*T\s*H\s*A\s*L\s*T\s*U\s*N\s*G) # Achtung, sollte auch in den Templates im Bestaetigungstext angepasst werden ann_stimme = A\s*N\s*N\s*U\s*L\s*L\s*I\s*E\s*R\s*U\s*N\s*G +# RegExp fuer Bestaetigung der Datenschutzklause (case-insensitive) +# Standardmaessig wird nur JA erkannt +bdsg_confirm = JA + # Template files (these files are in the template directory defined above) tpl_mailheader = "mailheader" # generally used mail header tpl_bouncelist = "bouncelist" # used by uvbounce.pl diff --git a/uvvote.pl b/uvvote.pl index c859504..0c12a06 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -319,7 +319,7 @@ sub process_vote { # Should read like this: #a [ STIMME ] Text # (Text is configurable in usevote.cfg) unless ($$body =~ /$bdsg_regexp/s && - $$body =~ /#a\W*?\[\W*?$config{ja_stimme}\W*?\]\W*?$bdsg2_regexp/is) { + $$body =~ /#a\W*?\[\W*?$config{bdsg_confirm}\W*?\]\W*?$bdsg2_regexp/is) { push (@errors, 'InvalidBDSG'); }