Correctly find $votename.
If the ballot is not quoted, the current regular expression will match $nametext (minus its first word) as second line of $votename. Change regular expression to match only certain common quote characters at beginning of second line. (Perhaps it would be even better to stop matching on empty lines ...) Check for erroneus match on $nametext as a safety measure. Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
		
							parent
							
								
									1ca99f7368
								
							
						
					
					
						commit
						a374bef4c7
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -241,9 +241,9 @@ sub process_vote {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  # correct voting?
 | 
			
		||||
  if ($$body =~ /\Q$config{ballotintro}\E\s+(.+?)\s*\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');
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue