X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fselfservice.cgi;h=d14cd1b61704f2333ccc08fe30164e36e3cc1808;hb=362003556ad0c58f21f82d5529e7bf10049d5688;hp=aadb4ac3d31736cf1a876df803c63c1b92177e60;hpb=b1e8c45e0a7a4142f62070c76dd10446ea7ea1ba;p=freeside.git diff --git a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi index aadb4ac3d..d14cd1b61 100755 --- a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi +++ b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi @@ -127,7 +127,7 @@ unless ( $nologin_actions{$action} ) { $cgi->param('password') =~ /^(.{0,$form_max})$/; my $password = $1; - if ( $cgi->param('email') =~ /^\s*([a-z0-9_\-\.\@]{1,$form_max})\s*$/i ) { + if ( $cgi->param('email') =~ /^\s*([a-z0-9_\-\.\+\@]{1,$form_max})\s*$/i ) { my $email = $1; $login_rv = login( @@ -599,25 +599,25 @@ sub payment_results { #the rest, it gives better error messages $cgi->param('amount') =~ /^\s*(\d+(\.\d{2})?)\s*$/ - or die "Illegal amount: ". $cgi->param('amount'); #!!! + or return { 'error' => "Illegal amount: ". $cgi->param('amount') }; #!!! my $amount = $1; my $payinfo = $cgi->param('payinfo'); $payinfo =~ s/[^\dx]//g; - $payinfo =~ /^([\dx]{13,16}|[\dx]{8,9})$/ + $payinfo =~ /^([\dx]{13,19}|[\dx]{8,9})$/ #or $error ||= $init_data->{msgcat}{invalid_card}; #. $self->payinfo; - or die "illegal card"; #!!! + or return { 'error' => "illegal card" }; #!!! $payinfo = $1; unless ( $payinfo =~ /x/ ) { validate($payinfo) #or $error ||= $init_data->{msgcat}{invalid_card}; #. $self->payinfo; - or die "invalid card"; #!!! + or return { 'error' => "invalid card" }; #!!! } if ( $cgi->param('card_type') ) { cardtype($payinfo) eq $cgi->param('card_type') #or $error ||= $init_data->{msgcat}{not_a}. $cgi->param('CARD_type'); - or die "not a ". $cgi->param('card_type'); + or return { 'error' => "not a ". $cgi->param('card_type') }; } $cgi->param('paycvv') =~ /^\s*(.{0,4})\s*$/ or die "illegal CVV2";