Skip to content

Commit dbb5559

Browse files
Merge branch '4.4' into 5.2
* 4.4: [CI][Psalm] Install stable/released PHPUnit [Security] Add missing Finnish translations [Security][Guard] Prevent user enumeration via response content
2 parents f409175 + a2416b9 commit dbb5559

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

Resources/config/guard.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
abstract_arg('Provider-shared Key'),
4646
abstract_arg('Authenticators'),
4747
service('logger')->nullOnInvalid(),
48+
param('security.authentication.hide_user_not_found'),
4849
])
4950
->tag('monolog.logger', ['channel' => 'security'])
5051
;

Resources/config/security_authenticator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
abstract_arg('provider key'),
4747
service('logger')->nullOnInvalid(),
4848
param('security.authentication.manager.erase_credentials'),
49+
param('security.authentication.hide_user_not_found'),
4950
])
5051
->tag('monolog.logger', ['channel' => 'security'])
5152

Tests/Functional/AuthenticatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testFirewallUserProvider($email, $withinFirewall)
4040
if ($withinFirewall) {
4141
$this->assertJsonStringEqualsJsonString('{"email":"'.$email.'"}', $client->getResponse()->getContent());
4242
} else {
43-
$this->assertJsonStringEqualsJsonString('{"error":"Username could not be found."}', $client->getResponse()->getContent());
43+
$this->assertJsonStringEqualsJsonString('{"error":"Invalid credentials."}', $client->getResponse()->getContent());
4444
}
4545
}
4646

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"symfony/console": "<4.4",
5555
"symfony/framework-bundle": "<4.4",
5656
"symfony/ldap": "<4.4",
57+
"symfony/security-http": "<5.2.8",
5758
"symfony/twig-bundle": "<4.4"
5859
},
5960
"autoload": {

0 commit comments

Comments
 (0)