This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony
Fabien Potencier cf28fd40b5 bug #11092 [HttpFoundation] Fix basic authentication in url with PHP-FPM (Kdecherf)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Fix basic authentication in url with PHP-FPM

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | dispute
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

`getUser()` and `getPassword()` from `Request` are broken when using PHP-FPM because of the lack of `$_SERVER['PHP_AUTH_USER']` and `$_SERVER['PHP_AUTH_PW']`. This PR fixes the issue.

However, now an empty password will return an empty string (which is the expected behavior of `ServerBag`) instead of `NULL`. The test is updated accordingly, but should we consider this as a breakage?

This issue was spotted by using basic auth via the Illuminate component of Laravel and is present from v2.1.0 to master.

Commits
-------

7a75adf [HttpFoundation] Basic auth in url is broken when using PHP CGI/FPM
2014-06-12 10:56:53 +02:00
..
Bridge [Bridge][Twig] Replace deprecated features 2014-06-06 05:23:41 +02:00
Bundle Fixed a html error "Element ul is not closed" in logger.html.twig 2014-06-09 21:13:04 +02:00
Component bug #11092 [HttpFoundation] Fix basic authentication in url with PHP-FPM (Kdecherf) 2014-06-12 10:56:53 +02:00