Permalink
Browse files

Remove newline from errormessages to be able to parse locale of it

Triggered by RT #306 it was found out that there were some error messages
containing a new line in the message. These lines would not be easy to
parse for the translated equivalent.

The newlines are needed for the expected working of the 'die' command
(see RT #306 for the discussion).
  • Loading branch information...
1 parent 07f1fd5 commit 849b9ca979e21b23b6e73b19596f408cb7a28595 Gert van der Spoel committed Feb 28, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Vend/UserDB.pm
View
@@ -1828,15 +1828,15 @@ sub new_account {
}
# plain error message without user-supplied username
# to avoid XSS exploit (RT #306)
- die errmsg("Username contains illegal characters.\n")
+ die errmsg("Username contains illegal characters.") . "\n"
if $self->{USERNAME} !~ m{^$self->{VALIDCHARS}+$};
die errmsg("Must have at least %s characters in username.",
$self->{USERMINLEN}) . "\n"
if length($self->{USERNAME}) < $self->{USERMINLEN};
if($self->{OPTIONS}{captcha}) {
my $status = Vend::Tags->captcha( { function => 'check' });
- die errmsg("Must input captcha code correctly.\n")
+ die errmsg("Must input captcha code correctly.") . "\n"
unless $status;
}

0 comments on commit 849b9ca

Please sign in to comment.