From 3303c13b7610ed45cbdddac7ab406b15888690f4 Mon Sep 17 00:00:00 2001 From: 53hornet Date: Tue, 23 Nov 2021 16:53:11 -0500 Subject: feat: impl experimental honeypot for mailtos and contact form --- index.php | 1 + 1 file changed, 1 insertion(+) (limited to 'index.php') diff --git a/index.php b/index.php index c3aef21..f3f82b1 100644 --- a/index.php +++ b/index.php @@ -358,6 +358,7 @@

Contact

+ -- cgit v1.2.3 From 67d2e7e1f3bdc0fc3a6ae6bc8982bb1aa09e074d Mon Sep 17 00:00:00 2001 From: 53hornet Date: Tue, 23 Nov 2021 16:56:50 -0500 Subject: fix: ignore forms with honeypot filled out --- index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index f3f82b1..2ec6e5e 100644 --- a/index.php +++ b/index.php @@ -358,7 +358,6 @@

Contact

- @@ -366,6 +365,8 @@ + + @@ -380,7 +381,7 @@ require('PHPMailer-master/src/Exception.php'); // handle form submission - if (isset($_POST['name'], $_POST['email'], $_POST['body'])) { + if (empty($_POST['content']) && isset($_POST['name'], $_POST['email'], $_POST['body'])) { $body = substr(strip_tags($_POST['body']), 0, 16384); $name = substr(strip_tags($_POST['name']), 0, 255); -- cgit v1.2.3