mirror of
https://git.d3data.de/3rdParty/captcha-module.git
synced 2025-04-17 19:41:34 +02:00
OXDEV-338 Fix removed strMan method usage
This commit is contained in:
parent
8ea9c5db5d
commit
c32f94a359
@ -110,10 +110,14 @@ class oeCaptcha extends oxSuperCfg
|
|||||||
*/
|
*/
|
||||||
public function getImageUrl()
|
public function getImageUrl()
|
||||||
{
|
{
|
||||||
$url = $this->getConfig()->getCurrentShopUrl() . 'modules/oe/captcha/core/utils/verificationimg.php?e_mac=';
|
$config = \OxidEsales\Eshop\Core\Registry::getConfig();
|
||||||
$key = $this->getConfig()->getConfigParam('oecaptchakey');
|
$url = $config->getCurrentShopUrl() . 'modules/oe/captcha/core/utils/verificationimg.php?e_mac=';
|
||||||
$key = empty($key) ? null : $key;
|
$key = $config->getConfigParam('oecaptchakey');
|
||||||
$url .= oxRegistry::getUtils()->strMan($this->getText(), $key);
|
|
||||||
|
$key = $key ? $key : $config->getConfigParam('sConfigKey');
|
||||||
|
|
||||||
|
$encryptor = new \OxidEsales\Eshop\Core\Encryptor();
|
||||||
|
$url .= $encryptor->encrypt($this->getText(), $key);
|
||||||
|
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ class Unit_Core_oecaptchaTest extends CaptchaTestCase
|
|||||||
*/
|
*/
|
||||||
public function testGetImageUrl()
|
public function testGetImageUrl()
|
||||||
{
|
{
|
||||||
$this->setConfigParam('oecaptchakey', 'someTestCaptchaKey');
|
$this->getConfig()->setConfigParam("oecaptchakey", 'someTestCaptchaKey');
|
||||||
$this->captcha->setNonPublicVar('text', 'test1');
|
$this->captcha->setNonPublicVar('text', 'test1');
|
||||||
$expected = $this->getConfig()->getShopUrl() . 'modules/oe/captcha/core/utils/verificationimg.php?e_mac=ox_MAsbCBYgVBoQ';
|
$expected = $this->getConfig()->getShopUrl() . 'modules/oe/captcha/core/utils/verificationimg.php?e_mac=ox_MAsbCBYgVBoQ';
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ class Unit_Core_oecaptchaTest extends CaptchaTestCase
|
|||||||
*/
|
*/
|
||||||
public function testGetImageUrlFallbackKey()
|
public function testGetImageUrlFallbackKey()
|
||||||
{
|
{
|
||||||
$this->setConfigParam('oecaptchakey', '');
|
$this->getConfig()->setConfigParam("oecaptchakey", '');
|
||||||
$this->captcha->setNonPublicVar('text', 'test1');
|
$this->captcha->setNonPublicVar('text', 'test1');
|
||||||
|
|
||||||
$expected = $this->getConfig()->getShopUrl() . 'modules/oe/captcha/core/utils/verificationimg.php?e_mac=ox_MB4FUUYlYlld';
|
$expected = $this->getConfig()->getShopUrl() . 'modules/oe/captcha/core/utils/verificationimg.php?e_mac=ox_MB4FUUYlYlld';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user