diff --git a/core/class/template.class.php b/core/class/template.class.php index 4ea906ab..d8f8f6d8 100644 --- a/core/class/template.class.php +++ b/core/class/template.class.php @@ -52,7 +52,7 @@ class template { // Génère deux nombres pour le captcha $numbers = array(0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20); $letters = array('u','t','s','r','q','p','o','n','m','l','k','j','i','h','g','f','e','d','c','b','a'); - $limit = $attributes['limit'] ? count($letters)-1 : 10 ; + $limit = $attributes['limit'] ? 9 : count($letters)-1 ; $firstNumber = rand ( 0 , $limit ); $secondNumber = rand ( 0 , $limit ); $result = $firstNumber + $secondNumber; diff --git a/core/core.php b/core/core.php index d5783642..81709e99 100644 --- a/core/core.php +++ b/core/core.php @@ -1476,13 +1476,6 @@ class common { $this->setData(['config', 'connect','captcha10', false]); $this->setData(['core', 'dataVersion', 10303]); } - // Version 10.4.00 - if ($this->getData(['core', 'dataVersion']) < 10400) { - // Activation par défaut du captcha à la connexion - $this->setData(['config', 'captchaStrong', $this->setData(['config', 'connect','captcha10'])]); - $this->deleteData(['config', 'connect','captcha10']); - $this->setData(['core', 'dataVersion', 10400]); - } } } diff --git a/core/module/config/config.php b/core/module/config/config.php index 13e474b5..b97d1481 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -470,7 +470,6 @@ class config extends common { 'proxyType' => $this->getInput('configProxyType'), 'proxyUrl' => $this->getInput('configProxyUrl'), 'proxyPort' => $this->getInput('configProxyPort',helper::FILTER_INT), - 'captchaStrong' => $this->getInput('configCaptchaStrong',helper::FILTER_BOOLEAN), 'smtp' => [ 'enable' => $this->getInput('configSmtpEnable',helper::FILTER_BOOLEAN), 'host' => $this->getInput('configSmtpHost',helper::FILTER_STRING_SHORT), @@ -486,6 +485,7 @@ class config extends common { 'timeout' => $this->getInput('configConnectTimeout',helper::FILTER_INT), 'log' => $this->getInput('configConnectLog',helper::FILTER_BOOLEAN), 'captcha' => $this->getInput('configConnectCaptcha',helper::FILTER_BOOLEAN), + 'captcha10' => $this->getInput('configConnectCaptcha10',helper::FILTER_BOOLEAN) ] ] ]); diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php index 8ac543b0..007b3d85 100644 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -100,9 +100,9 @@ ]); ?>
- $this->getData(['config', 'captchaStrong']), - 'help' => 'Addition de chiffres de 0 à 20.' + $this->getData(['config', 'connect','captcha10']), + 'help' => 'Addition limitée aux chiffres de 0 à 9. S\'applique à tous les captchas du site.' ]); ?>
diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index f4e07063..03ff078d 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -16,7 +16,6 @@ class init extends common { 'legalPageId' => 'mentions-legales', 'searchPageId' => 'recherche', 'maintenance' => false, - 'captchaStrong' => false, 'social' => [ 'facebookId' => 'facebook', 'instagramId' => '', diff --git a/core/module/user/view/login/login.php b/core/module/user/view/login/login.php index 43b59702..a7219ce6 100644 --- a/core/module/user/view/login/login.php +++ b/core/module/user/view/login/login.php @@ -16,7 +16,7 @@
$this->getData(['config','captchaStrong']) + 'limit' => $this->getData(['config','connect','captcha10']) ]); ?>
diff --git a/module/blog/view/article/article.php b/module/blog/view/article/article.php index 9f60ac47..51c6ec80 100644 --- a/module/blog/view/article/article.php +++ b/module/blog/view/article/article.php @@ -98,7 +98,7 @@
$this->getData(['config','captchaStrong']) + 'limit' => $this->getData(['config','connect','captcha10']) ]); ?>
diff --git a/module/form/view/index/index.php b/module/form/view/index/index.php index 1a10764c..02b082e2 100644 --- a/module/form/view/index/index.php +++ b/module/form/view/index/index.php @@ -47,7 +47,7 @@
$this->getData(['config','captchaStrong']) + 'limit' => $this->getData(['config','connect','captcha10']) ]); ?>