From 3ab56bde53da7d77b3119e6793059aa9689e0d11 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Wed, 19 Mar 2014 21:46:32 +0100 Subject: [PATCH] Correctly find $votename. Picked from upstream. Signed-off-by: Thomas Hochstein --- CHANGES | 2 ++ UVconfig.pm | 1 + uvvote.pl | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index ba7460a..5067501 100644 --- a/CHANGES +++ b/CHANGES @@ -26,6 +26,8 @@ Version 4.12 (19.01.2014): - BDSG-Klausel muss nun standardmaessig zwingend mit JA beantwortet werden, DAFUER wird nicht mehr akzeptiert. Dies kann in usevote.cfg konfiguriert werden +- Regular Expression fuer Pruefung des Abstimmungsnamens weiter + verbessert Version 4.11 (25.09.2012): - Regular Expression fuer Pruefung des Abstimmungsnamens verbessert. diff --git a/UVconfig.pm b/UVconfig.pm index 571ab69..1c64b14 100644 --- a/UVconfig.pm +++ b/UVconfig.pm @@ -121,6 +121,7 @@ sub read_config { tpl_rule_violated => 'rule-violated', begin_divider => 'Alles vor dieser Zeile bitte loeschen', end_divider => 'Alles nach dieser Zeile bitte loeschen', + ballotintro => 'WAHLSCHEIN fuer', nametext => 'Dein Realname, falls nicht im FROM-Header:', nametext2 => 'Waehlername:', addresstext => 'Waehleradresse:', diff --git a/uvvote.pl b/uvvote.pl index a82874a..c101f1f 100644 --- a/uvvote.pl +++ b/uvvote.pl @@ -231,9 +231,9 @@ sub process_vote { } # correct voting? - if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)[^\S\n]*\n([>:|]*?[\t ]+(\S+.+)\s*$)?/m) { + if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)\s*\n([>:|]*?[\t ]+(\S+.+)\s*$)?/m) { $voting = $1; - $voting .= " $3" if defined($3); + $voting .= " $3" if (defined($3) and $3 !~ /\Q$config{nametext}\E/); push (@errors, 'WrongVoting') if ($config{votename} !~ /^\s*\Q$voting\E\s*$/); } else { push (@errors, 'NoVoting'); -- 2.20.1