From bfb9102d5136655640fb0138920465e5503ab9b3 Mon Sep 17 00:00:00 2001 From: swag Date: Sat, 9 Apr 2022 00:54:58 -0400 Subject: [PATCH] Don't need validation unless it's a POST (probably should re-think this whole route) --- guestbook-ng.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guestbook-ng.pl b/guestbook-ng.pl index 75c08b0..8cac629 100755 --- a/guestbook-ng.pl +++ b/guestbook-ng.pl @@ -62,7 +62,7 @@ under sub ($c) { get '/' => sub ($c) { $c->redirect_to(page => {page => 'view'}) }; any [qw{GET POST}], '/sign' => sub ($c) { - my $v = $c->validation(); + my $v = $c->validation() if $c->req->method eq 'POST'; if ($c->req->method eq 'POST' && $v->has_data) { my $name = $c->param('name') || 'Anonymous';