Skip to content

Commit 83912c6

Browse files
committed
minor #17178 Shortening code block for PHP (ThomasLandauer)
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- Shortening code block for PHP If you agree, I'll shorten YAML and XML too. Commits ------- b85ecbc Shortening code block for PHP
2 parents d6392af + b85ecbc commit 83912c6

File tree

1 file changed

+8
-24
lines changed

1 file changed

+8
-24
lines changed

security.rst

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,14 +1398,10 @@ You must enable this using the ``login_throttling`` setting:
13981398
# by default, the feature allows 5 login attempts per minute
13991399
login_throttling: null
14001400
1401-
# configure the maximum login attempts (per minute)
1401+
# configure the maximum login attempts
14021402
login_throttling:
1403-
max_attempts: 3
1404-
1405-
# configure the maximum login attempts in a custom period of time
1406-
login_throttling:
1407-
max_attempts: 3
1408-
interval: '15 minutes'
1403+
max_attempts: 3 # per minute ...
1404+
# interval: '15 minutes' # ... or in a custom period
14091405
14101406
# use a custom rate limiter via its service ID
14111407
login_throttling:
@@ -1428,13 +1424,9 @@ You must enable this using the ``login_throttling`` setting:
14281424
<!-- ... -->
14291425
14301426
<firewall name="main">
1431-
<!-- by default, the feature allows 5 login attempts per minute -->
1432-
<login-throttling/>
1433-
1434-
<!-- configure the maximum login attempts (per minute) -->
1435-
<login-throttling max-attempts="3"/>
1436-
1437-
<!-- configure the maximum login attempts in a custom period of time -->
1427+
<!-- by default, the feature allows 5 login attempts per minute
1428+
max-attempts: (optional) You can configure the maximum attempts ...
1429+
interval: (optional) ... and the period of time. -->
14381430
<login-throttling max-attempts="3" interval="15 minutes"/>
14391431
14401432
<!-- use a custom rate limiter via its service ID -->
@@ -1454,17 +1446,9 @@ You must enable this using the ``login_throttling`` setting:
14541446
$mainFirewall = $security->firewall('main');
14551447
14561448
// by default, the feature allows 5 login attempts per minute
1457-
$mainFirewall->loginThrottling();
1458-
1459-
// configure the maximum login attempts (per minute)
1460-
$mainFirewall->loginThrottling()
1461-
->maxAttempts(3)
1462-
;
1463-
1464-
// configure the maximum login attempts in a custom period of time
14651449
$mainFirewall->loginThrottling()
1466-
->maxAttempts(3)
1467-
->interval('15 minutes')
1450+
// ->maxAttempts(3) // Optional: You can configure the maximum attempts ...
1451+
// ->interval('15 minutes') // ... and the period of time.
14681452
;
14691453
};
14701454

0 commit comments

Comments
 (0)