Commit 25dd52e
committed
bug symfony#59640 [Security] Return null instead of empty username to fix deprecation notice (phasdev)
This PR was merged into the 6.4 branch.
Discussion
----------
[Security] Return null instead of empty username to fix deprecation notice
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix symfony#59584
| License | MIT
`RemoteUserAuthenticator` may return an empty string when extracting a username from the configured `$_SERVER` parameter (e.g. `REMOTE_USER`).
An empty username triggers the `User Deprecated: Since symfony/security-http 7.2: Using an empty string as user identifier is deprecated and will throw an exception in Symfony 8.0.`
Return `null` instead of empty username to skip authenticator when username is empty and fix Symfony 8 deprecation notice.
Commits
-------
a8516b7 [Security] Return null instead of empty username to fix deprecation noticeFile tree
2 files changed
+2
-1
lines changed- src/Symfony/Component/Security/Http
- Authenticator
- Tests/Authenticator
2 files changed
+2
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
0 commit comments