X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Ffilter%2Fcrypto%2Fclass_CaptchaEncryptFilter.php;h=13ea605e82a57467f4336a7b0e40f4c5e3345b40;hb=4d92fa6063058d861ffd7b82d0fb8dd58ffc1d27;hp=955af1438f6b1f61cb7461b92f6a5756ad854ed9;hpb=cad1ab5ecb2935a6ebf678555860c3bd96b525b0;p=core.git diff --git a/framework/main/classes/filter/crypto/class_CaptchaEncryptFilter.php b/framework/main/classes/filter/crypto/class_CaptchaEncryptFilter.php index 955af143..13ea605e 100644 --- a/framework/main/classes/filter/crypto/class_CaptchaEncryptFilter.php +++ b/framework/main/classes/filter/crypto/class_CaptchaEncryptFilter.php @@ -3,7 +3,8 @@ namespace Org\Mxchange\CoreFramework\Filter\Captcha; // Import framework stuff -use Org\Mxchange\CoreFramework\Factory\ObjectFactory; +use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; +use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filter\BaseFilter; use Org\Mxchange\CoreFramework\Filter\Filterable; use Org\Mxchange\CoreFramework\Helper\Crypto\CryptoHelper; @@ -15,11 +16,7 @@ use Org\Mxchange\CoreFramework\Response\Responseable; * * @author Roland Haeder * @version 0.0.0 -<<<<<<< HEAD:framework/main/classes/filter/crypto/class_CaptchaEncryptFilter.php - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team -======= - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2016 Core Developer Team ->>>>>>> Some updates::inc/main/classes/filter/crypto/class_CaptchaEncryptFilter.php + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2022 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -42,7 +39,7 @@ class CaptchaEncryptFilter extends BaseFilter implements Filterable { * * @return void */ - protected function __construct () { + private function __construct () { // Call parent constructor parent::__construct(__CLASS__); } @@ -75,11 +72,11 @@ class CaptchaEncryptFilter extends BaseFilter implements Filterable { // Is it there? if (is_null($encryptRequest)) { // Not found, so request is invalid - $requestInstance->requestIsValid(false); + $requestInstance->setIsRequestValid(FALSE); // Throw exception throw new EncryptMissingException($this, CryptoHelper::EXCEPTION_ENCRYPT_MISSING); - } // END - if + } // Decode it fully $encryptDecoded = base64_decode(str_replace(' ', '+', urldecode($encryptRequest))); @@ -88,13 +85,13 @@ class CaptchaEncryptFilter extends BaseFilter implements Filterable { $decryptedString = ObjectFactory::createObjectByConfiguredName('crypto_class')->decryptString($encryptDecoded); // Is it the expected length? - if (strlen($decryptedString) != $this->getConfigInstance()->getConfigEntry('captcha_string_length')) { + if (strlen($decryptedString) != FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('captcha_string_length')) { // Not found, so request is invalid - $requestInstance->requestIsValid(false); + $requestInstance->setIsRequestValid(FALSE); // Throw exception throw new EncryptInvalidLengthException($this, CryptoHelper::EXCEPTION_ENCRYPT_INVALID); - } // END - if + } // Write it to the request $requestInstance->setRequestElement('decrypted', $decryptedString);