[FEATURE] Akismet check for tx_form 14/33314/3
authortritum_rz <ralf.zimmermann@tritum.de>
Tue, 14 Oct 2014 21:38:55 +0000 (23:38 +0200)
committerRalf Zimmermann <ralf.zimmermann@tritum.de>
Tue, 14 Oct 2014 21:39:27 +0000 (23:39 +0200)
Resolves: #57516
Releases: 6.2
Change-Id: I34dda2d7e8b1f29a6f0b4a8019895985d1d81970
Reviewed-on: http://review.typo3.org/33314
Reviewed-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Tested-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Classes/Extensions/Form/PostProcess/WtspamshieldvalidatorPostProcessor.php

index f0a693a..794e905 100755 (executable)
@@ -94,12 +94,13 @@ class WtspamshieldvalidatorPostProcessor implements \TYPO3\CMS\Form\PostProcess\
 
                        $this->requestHandler->setMethod('session');
                        if ($this->requestHandler->hasRequest()) {
-                               $session = $this->requestHandler->getSession();
-
-                               $validateArray = $session;
+                               $validateArray = $this->requestHandler->getSession();
+                               $error = $this->validate($validateArray);
+                       } else if ($this->requestHandler->getPost()) {
+                               $validateArray = $this->requestHandler->getPost();
                                $error = $this->validate($validateArray);
                        } else {
-                               $error = 'no session data';
+                               $error = 'no form data';
                        }
 
                        $urlConf = array('parameter' => 0);