8000 Security hardening - Rate limiter · symfony/symfony@e61553a · GitHub
[go: up one dir, main page]

Skip to content

Commit e61553a

Browse files
committed
Security hardening - Rate limiter
1 parent 7611d24 commit e61553a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/RateLimiter/RateLimiterFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function __construct(array $config, StorageInterface $storage, ?LockFacto
4646

4747
public function create(?string $key = null): LimiterInterface
4848
{
49-
$id = $this->config['id'].$key;
49+
$id = $this->config['id'].'-'.$key;
5050
$lock = $this->lockFactory ? $this->lockFactory->createLock($id) : new NoLock();
5151

5252
switch ($this->config['policy']) {

src/Symfony/Component/Security/Http/RateLimiter/DefaultLoginRateLimiter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected function getLimiters(Request $request): array
4141
{
4242
return [
4343
$this->globalFactory->create($request->getClientIp()),
44-
$this->localFactory->create($request->attributes->get(Security::LAST_USERNAME).$request->getClientIp()),
44+
$this->localFactory->create($request->attributes->get(Security::LAST_USERNAME).'-'.$request->getClientIp()),
4545
];
4646
}
4747
}

0 commit comments

Comments
 (0)
0