X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Ffilter%2Fcrypto%2Fclass_CaptchaEncryptFilter.php;h=99fc84cf0b11997cd8e7c0c885761d50398b478a;hb=d22762d78ae09d7601d33733550830fa9c6fc7a7;hp=3a20eb2929e248358629cb47a37f7e704f8dec07;hpb=c6d73b0e3246efc824cb98338d4be7ee5bc9f308;p=core.git diff --git a/inc/classes/main/filter/crypto/class_CaptchaEncryptFilter.php b/inc/classes/main/filter/crypto/class_CaptchaEncryptFilter.php index 3a20eb29..99fc84cf 100644 --- a/inc/classes/main/filter/crypto/class_CaptchaEncryptFilter.php +++ b/inc/classes/main/filter/crypto/class_CaptchaEncryptFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -35,16 +35,12 @@ class CaptchaEncryptFilter extends BaseFilter implements Filterable { /** * Creates an instance of this filter class * - * @param $controllerInstance An instance of a Controller class * @return $filterInstance An instance of this filter class */ - public final static function createCaptchaEncryptFilter (Controller $controllerInstance) { + public final static function createCaptchaEncryptFilter () { // Get a new instance $filterInstance = new CaptchaEncryptFilter(); - // Set the controller - $filterInstance->setControllerInstance($controllerInstance); - // Return the instance return $filterInstance; } @@ -71,13 +67,13 @@ class CaptchaEncryptFilter extends BaseFilter implements Filterable { } // END - if // Decode it fully - $encryptDecoded = base64_decode(str_replace(" ", "+", urldecode($encryptRequest))); + $encryptDecoded = base64_decode(str_replace(' ', '+', urldecode($encryptRequest))); // Get a crypto helper and decrypt the string $decryptedString = ObjectFactory::createObjectByConfiguredName('crypto_class')->decryptString($encryptDecoded); // Is it the expected length? - if (strlen($decryptedString) != $this->getConfigInstance()->readConfig('captcha_string_length')) { + if (strlen($decryptedString) != $this->getConfigInstance()->getConfigEntry('captcha_string_length')) { // Not found, so request is invalid $requestInstance->requestIsValid(false);