fix: [security] flood protection control enabled by default

- as reported by Dawid Czarnecki from Zigrin Security
pull/92/head
iglocska 2022-02-19 01:34:07 +01:00
parent 6e67a5b239
commit 283299bf36
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
2 changed files with 2 additions and 2 deletions

View File

@ -317,7 +317,7 @@ class UsersController extends AppController
if (empty(Configure::read('security.registration.self-registration'))) {
throw new UnauthorizedException(__('User self-registration is not open.'));
}
if (!empty(Configure::read('security.registration.floodProtection'))) {
if (!Configure::check('security.registration.floodProtection') || Configure::read('security.registration.floodProtection')) {
$this->FloodProtection->check('register');
}
if ($this->request->is('post')) {

View File

@ -301,7 +301,7 @@ class CerebrateSettingsProvider extends BaseSettingsProvider
'name' => __('Enable registration flood-protection'),
'type' => 'boolean',
'description' => __('Enabling this setting will only allow 5 registrations / IP address every 15 minutes (rolling time-frame).'),
'default' => false,
'default' => true,
],
]
],