aboutsummaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2021-07-14 19:33:57 -0400
committerThedro Neely <thedroneely@gmail.com>2021-07-14 19:33:57 -0400
commit9eb759feece6014bfed685946eac48c123071476 (patch)
treeac103c25b311cd5aee0579a8ffc936cb3edcff60 /app/controllers
parentda2aa0f982adfe14907659cfeedc71893518bfb5 (diff)
downloadthedroneely.com-9eb759feece6014bfed685946eac48c123071476.tar.gz
thedroneely.com-9eb759feece6014bfed685946eac48c123071476.tar.bz2
thedroneely.com-9eb759feece6014bfed685946eac48c123071476.zip
app/controllers/contact: Minor adjustments
Signal 403 to robots on empty. Hide honey pot using position absolute.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/contact.controller.php7
1 files changed, 2 insertions, 5 deletions
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" . '<b>'. $email . '</b>';
- include '../app/views/contact.view.php';
- return;
+ return include '../app/views/contact.view.php';
}
$formSuccess = true;