From 9eb759feece6014bfed685946eac48c123071476 Mon Sep 17 00:00:00 2001 From: Thedro Neely Date: Wed, 14 Jul 2021 19:33:57 -0400 Subject: app/controllers/contact: Minor adjustments Signal 403 to robots on empty. Hide honey pot using position absolute. --- app/controllers/contact.controller.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/contact.controller.php b/app/controllers/contact.controller.php index 504b979..797cccd 100644 --- a/app/controllers/contact.controller.php +++ b/app/controllers/contact.controller.php @@ -10,19 +10,16 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $form->spam = $spam = $_POST['agree'] ?? false; if ($form->empty()) { - include '../app/views/contact.view.php'; - return; + return http_response_code(403); } if ($form->spam()) { - error_log('Contact Form Spam: Error 403'); return http_response_code(403); } if ($form->emailValid() === false) { $emailError = 'Invalid email: ' . "\r" . ''. $email . ''; - include '../app/views/contact.view.php'; - return; + return include '../app/views/contact.view.php'; } $formSuccess = true; -- cgit v1.2.3