Commit Graph

17375 Commits

Author SHA1 Message Date
Fabien Potencier
905bbbdd90 bug #14335 [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo (danez)
This PR was squashed before being merged into the 2.3 branch (closes #14335).

Discussion
----------

[HttpFoundation] Fix baseUrl when script filename is contained in pathInfo

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #13617
| License       | MIT
| Doc PR        |

When the script filename is just /index.php, dirname() returns '/' for it. In Request::prepareBaseUrl() we append '/' to it (as introduced in #13039), which is wrong in this scenario as the resulting string is '//'.

When we rtrim('/') the output of dirname() then '/' would be constructed in this case, and in all other cases it makes no difference as dirname() already trims the right forward slash if there are path segments.

The test-cases should clarify the exact scenario.

Commits
-------

f24a6dd [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo
2015-05-20 10:53:09 +02:00
Daniel Tschinder
f24a6dd43a [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo 2015-05-20 10:53:07 +02:00
Fabien Potencier
7a4fdf7e67 bug #14593 [Security][Firewall] Avoid redirection to XHR URIs (asiragusa)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #14593).

Discussion
----------

[Security][Firewall] Avoid redirection to XHR URIs

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

If `security.firewalls.main.form_login.always_use_default_target_path` is false, an user could be redirected to an URL called by an AJAX request after the login.

Commits
-------

9ee74ea Avoid redirection to XHR URIs
2015-05-20 10:40:29 +02:00
Alessandro Siragusa
9ee74eaef0 Avoid redirection to XHR URIs 2015-05-20 10:40:29 +02:00
Fabien Potencier
75ed3b1a02 bug #14618 [DomCrawler] Throw an exception if a form field path is incomplete (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] Throw an exception if a form field path is incomplete

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11807
| License       | MIT
| Doc PR        | -

Commits
-------

991e65c [DomCrawler] Throw an exception if a form field path is incomplete.
2015-05-20 10:21:21 +02:00
Fabien Potencier
f0cda43c33 minor #14684 [Console] Delete duplicate test in CommandTest (nanocom)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] Delete duplicate test in CommandTest

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

The __get method is not implemented in the Command class, and the deleted test was duplicated with the preceding one.

Commits
-------

4a4eda9 [Console] Delete duplicate test in CommandTest
2015-05-20 10:11:51 +02:00
Fabien Potencier
96e9cca845 bug #14698 [2.3] Fix HTML escaping of to-source links (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Fix HTML escaping of to-source links

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

Commits
-------

385a6b7 Fix HTML escaping of to-source links
2015-05-20 09:45:20 +02:00
Fabien Potencier
ea6e3d5109 bug #14690 [HttpFoundation] IpUtils::checkIp4() should allow /0 networks (zerkms)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #14690).

Discussion
----------

[HttpFoundation] IpUtils::checkIp4() should allow `/0` networks

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14674
| License       | MIT

Technically it's a breaking change, since the result of the

    IpUtils::checkIp4('1.2.3.4', '0.0.0.0/0')

call was `false` now `true`.

Practically - no one should ever relied on this since it's simply wrong

Commits
-------

921ecff [HttpFoundation] IpUtils::checkIp4() should allow  networks
2015-05-20 09:39:40 +02:00
Ivan Kurnosov
921ecff9e2 [HttpFoundation] IpUtils::checkIp4() should allow networks 2015-05-20 09:39:40 +02:00
Nicolas Grekas
385a6b799f Fix HTML escaping of to-source links 2015-05-19 17:44:44 -07:00
Fabien Potencier
af0e02c35e minor #14681 [FrameworkBundle] Removed unnecessary parameter in TemplateController (King2500)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #14681).

Discussion
----------

[FrameworkBundle] Removed unnecessary parameter in TemplateController

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | They should
| License       | MIT

`Response::setPublic()` doesn't have any parameters, so this parameter call is not needed.

Commits
-------

7a4394e [FrameworkBundle] Removed unnecessary parameter in TemplateController
2015-05-19 12:17:14 +02:00
Thomas Schulz
7a4394e771 [FrameworkBundle] Removed unnecessary parameter in TemplateController
Response::setPublic doesn't have any parameters, so this parameter call is not needed.
2015-05-19 12:17:14 +02:00
Jakub Zalas
991e65c96f [DomCrawler] Throw an exception if a form field path is incomplete. 2015-05-19 09:01:33 +01:00
Arnaud Kleinpeter
4a4eda93c8 [Console] Delete duplicate test in CommandTest
There is no __get method in the Command class, and the deleted test was duplicated with the preceding one.
2015-05-18 19:58:47 +02:00
Fabien Potencier
4d40852596 bug #14262 [TwigBundle] Refresh twig paths when resources change. (aitboudad)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #14262).

Discussion
----------

[TwigBundle] Refresh twig paths when resources change.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Fixed tickets  | ~
| Tests pass?   | yes
| License       | MIT

Commits
-------

cafb0d7 [TwigBundle] Refresh twig paths when resources change.
2015-05-16 16:20:38 +02:00
Abdellatif Ait boudad
cafb0d7b11 [TwigBundle] Refresh twig paths when resources change. 2015-05-16 16:20:37 +02:00
Fabien Potencier
dd2fb850a7 bug #13633 [ServerBag] Handled bearer authorization header in REDIRECT_ form (Lance0312)
This PR was merged into the 2.3 branch.

Discussion
----------

[ServerBag] Handled bearer authorization header in REDIRECT_ form

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

Apache rewrite module renames client request
header (`HTTP_`) by prepending `REDIRECT_` to
it. http basic authentication and http digest
authentication are properly processed in
REDIRECT_ form, while bearer is processed in
HTTP_ form, but dropped in REDIRECT_ form.

Example:
The following auth headers are handled in ServerBag,
```
HTTP_AUTHORIZATION => Basic aGVsbG86d29ybGQ=
REDIREDCT_HTTP_AUTHOIZATION => Basic aGVsbG86d29ybGQ=
HTTP_AUTHORIZATION => Digest blah
REDIRECT_HTTP_AUTHORIZATION => Digest blah
HTTP_AUTHORIZATION => Bearer mF_9.B5f-4.1JqM
```
while
```
REDIRECT_HTTP_AUTHORIZATION => Bearer mF_9.B5f-4.1JqM
```
is dropped.

Commits
-------

7b2e2df Handled bearer authorization header in REDIRECT_ form
2015-05-16 15:43:51 +02:00
Fabien Potencier
2ffd5a49fe bug #13637 [CSS] WebProfiler break words (nicovak)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #13637).

Discussion
----------

[CSS] WebProfiler break words

WebProfiler CSS word-break: break-all;
Do you need more description ?

Commits
-------

7259d72 WebProfiler break words
2015-05-16 15:40:55 +02:00
Kovacs Nicolas
7259d72676 WebProfiler break words
WebProfiler CSS word-break: break-all;
2015-05-16 15:40:55 +02:00
Fabien Potencier
3eb8ee7925 minor #14432 [Framework] added test for router commands. (aitboudad)
This PR was merged into the 2.3 branch.

Discussion
----------

[Framework] added test for router commands.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Fixed tickets  | ~
| Tests pass?   | yes
| License       | MIT

- [x] router:debug
- [x] router:match

Commits
-------

6d403a7 [Framework] added test for Router commands.
2015-05-16 15:35:20 +02:00
Fabien Potencier
294cbb7521 fixed typo 2015-05-16 14:34:16 +02:00
Fabien Potencier
1b401b83eb minor #14601 [Security][Translation] fixes #14584 (MatTheCat)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security][Translation] fixes #14584

| Q             | A
| ------------- | ---
| Fixed tickets | #14584
| License       | MIT

Some french translations are wrong  in the security component.
As #14587 has been closed here's my fix.

Commits
-------

34c780f [Security][Translation] fixes #14584
2015-05-16 14:17:29 +02:00
Fabien Potencier
5ea91e9ff2 minor #14646 Update README.md (94noni)
This PR was merged into the 2.3 branch.

Discussion
----------

Update README.md

See https://github.com/symfony/symfony/pull/14347
@ping @nicolas-grekas

Commits
-------

ec89cfd Update README.md
2015-05-15 16:16:38 +02:00
Antoine Makdessi
ec89cfd226 Update README.md 2015-05-15 16:06:52 +02:00
Fabien Potencier
34d83a70b3 fixed CS 2015-05-15 15:45:10 +02:00
Fabien Potencier
984d82cbe5 minor #14121 CS: Pre incrementation/decrementation should be used if possible (gharlan)
This PR was merged into the 2.3 branch.

Discussion
----------

CS: Pre incrementation/decrementation should be used if possible

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

Fixes provided by new fixer: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1113

If this pr is merged I would change the level of the fixer to `symfony`.

Commits
-------

c5123d6 CS: Pre incrementation/decrementation should be used if possible
2015-05-15 15:28:34 +02:00
Fabien Potencier
ebe78bb9ef minor #14598 [Security] Fix tests in HHVM (dosten)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Fix tests in HHVM

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

This PR fixes the tests in the Security components when run in HHVM. The failing tests are related to sebastianbergmann/phpunit-mock-objects#207

Commits
-------

139bae7 Fix tests in HHVM
2015-05-15 15:13:27 +02:00
Christophe Coevoet
da58ad74d5 minor #14228 Add PHP7 compatible versions for the Null/True/False constraints as they are reserved words in PHP7 (stefan.r)
This PR was merged into the 2.3 branch.

Discussion
----------

Add PHP7 compatible versions for the Null/True/False constraints as they are reserved words in PHP7

| Q             | A
| ------------- | ---
| Bug fix?      |  PHP7 compatibility
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | N/A
| Fixed tickets | N/A - helps towards https://github.com/symfony/symfony/issues/14086
| License       | MIT

Null, True and False are reserved words in PHP7:

https://wiki.php.net/rfc/reserve_more_types_in_php_7

Commits
-------

44edbdf Fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator)
2015-05-15 11:24:48 +02:00
Fabien Potencier
291cf61616 bug #14633 [2.3][EventDispatcher] make listeners removable from an executed listener (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][EventDispatcher] make listeners removable from an executed listener

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #13972
| License       | MIT
| Doc PR        |

This fixes #13972 for Symfony 2.3. On Symfony 2.6 and higher, this has already been fixed with #14355.

Commits
-------

54bb399 [EventDispatcher] make listeners removable from an executed listener
2015-05-14 19:40:02 +02:00
Christian Flothmann
54bb3995ab [EventDispatcher] make listeners removable from an executed listener 2015-05-14 17:38:12 +02:00
Fabien Potencier
52c78b9cb4 minor #14632 [HttpFoundation] Fix volatile MongoDbSessionHandlerTest::testRead() (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Fix volatile MongoDbSessionHandlerTest::testRead()

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

Commits
-------

57571a9 [HttpFoundation] Fix volatile MongoDbSessionHandlerTest::testRead()
2015-05-14 17:09:07 +02:00
Jakub Zalas
5930800cfd [HttpKernel] Handle an array vary header in the http cache store 2015-05-14 16:01:09 +01:00
Nicolas Grekas
57571a9612 [HttpFoundation] Fix volatile MongoDbSessionHandlerTest::testRead() 2015-05-14 10:16:30 +02:00
Nicolas Grekas
b403edd1bc fix missing links to https://symfony.com 2015-05-13 13:31:01 +02:00
Nicolas Grekas
b25b11b842 minor #14626 [travis] Don't use the cache (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] Don't use the cache

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

The composer cache breaks per components builds (deps=low/high)

Commits
-------

103c0df [travis] Don't use the cache
2015-05-13 13:22:46 +02:00
Nicolas Grekas
103c0dfeba [travis] Don't use the cache 2015-05-13 12:15:38 +02:00
stefan.r
44edbdf9c0 Fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator) 2015-05-13 11:33:22 +02:00
Nicolas Grekas
cd0a63d8e2 minor #14613 [travis] Use container-based infrastructure (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] Use container-based infrastructure

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

Let's see if this works...

Commits
-------

2aea3aa [travis] Use container-based infrastructure
2015-05-12 16:16:12 +02:00
Nicolas Grekas
2aea3aa67b [travis] Use container-based infrastructure 2015-05-12 11:50:11 +02:00
Diego Saint Esteben
139bae7047 Fix tests in HHVM 2015-05-11 23:26:17 -03:00
Fabien Potencier
5c996c4e9b minor #14604 [DependencyInjection] ContainerInterface: unused exception dropped (TomasVotruba)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] ContainerInterface: unused exception dropped

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT

Ref https://github.com/symfony/symfony/pull/14599

Commits
-------

8e0d96c ContainerInterface: unused exception dropped
2015-05-11 19:13:05 +02:00
Tomas Votruba
8e0d96ca80 ContainerInterface: unused exception dropped 2015-05-11 14:02:11 +02:00
Fabien Potencier
415245ee89 bumped Symfony version to 2.3.29 2015-05-11 03:22:26 +02:00
MatTheCat
34c780f7e7 [Security][Translation] fixes #14584 2015-05-10 23:45:50 +02:00
Fabien Potencier
56bc4057e3 updated VERSION for 2.3.28 2015-05-10 17:02:48 +02:00
Fabien Potencier
76a2a68952 update CONTRIBUTORS for 2.3.28 2015-05-10 17:02:28 +02:00
Fabien Potencier
25927d8d71 updated CHANGELOG for 2.3.28 2015-05-10 17:02:01 +02:00
Fabien Potencier
492d66ee74 minor #14578 [Securty] PhpDoc fix in AbstractRememberMeServices (MacDada)
This PR was merged into the 2.3 branch.

Discussion
----------

[Securty] PhpDoc fix in AbstractRememberMeServices

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

All extending classes return `UserInterface`, not `TokenInterface`:

* https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php#L64
* https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php#L116

And `AbstractRememberMeServices` actually requires the return value to be `UserInterface`:

```
$user = $this->processAutoLoginCookie($cookieParts, $request);

if (!$user instanceof UserInterface) {
    throw new \RuntimeException('processAutoLoginCookie() must return a UserInterface implementation.');
}
```

Commits
-------

a73d2cc PhpDoc fix in AbstractRememberMeServices
2015-05-08 16:48:03 +02:00
Tobias Schultze
a95559858d [SecurityBundle] use session auth constants in config 2015-05-08 02:01:21 +02:00
Tobias Schultze
2f5e72b807 minor #14570 [SecurityBundle] Use Enum Nodes Instead Of Scalar (vadim2404)
This PR was merged into the 2.3 branch.

Discussion
----------

[SecurityBundle] Use Enum Nodes Instead Of Scalar

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

Commits
-------

ce7fb04 [SecurityBundle] Use Enum Nodes Instead Of Scalar
2015-05-08 01:43:20 +02:00