fix: [security] flood protection control enabled by default
- as reported by Dawid Czarnecki from Zigrin Securitypull/92/head
parent
6e67a5b239
commit
283299bf36
|
@ -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')) {
|
||||
|
|
|
@ -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,
|
||||
],
|
||||
]
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue