From 649c728946a46a4f938cddc0221e9deefbbc4685 Mon Sep 17 00:00:00 2001 From: Ben Croker Date: Tue, 27 Apr 2021 18:52:47 +0100 Subject: [PATCH] 3.0.3 --- CHANGELOG.md | 4 ++++ composer.json | 2 +- src/Snaptcha.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 869ec16..7dfe254 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 3.0.3 - 2021-04-27 +### Fixed +- Fixed a bug in which the PHP script was allowed to continue even if a submission was flagged as spam ([#16](https://github.com/putyourlightson/craft-snaptcha/issues/16)). + ## 3.0.2 - 2021-04-16 ### Changed - The keys of posted arrays are now preserved when a submission is flagged as spam. diff --git a/composer.json b/composer.json index cdb5ba6..d77fcc8 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "putyourlightson/craft-snaptcha", "description": "Automatically validates forms and prevents spam bots from submitting to your site.", - "version": "3.0.2", + "version": "3.0.3", "type": "craft-plugin", "homepage": "https://putyourlightson.com/plugins/snaptcha", "license": "proprietary", diff --git a/src/Snaptcha.php b/src/Snaptcha.php index d87307d..a6551b4 100644 --- a/src/Snaptcha.php +++ b/src/Snaptcha.php @@ -116,7 +116,7 @@ public function validateField(ActionEvent $event) Craft::$app->response->statusCode = 400; Craft::$app->response->content = $output; - Craft::$app->response->sendAndClose(); + Craft::$app->end(); } }