Commit Graph

16682 Commits

Author SHA1 Message Date
Fabien Potencier
2ecf45c0f2 bug #12491 [Security] Don't send remember cookie for sub request (blanchonvincent)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12491).

Discussion
----------

[Security] Don't send remember cookie for sub request

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

Remember cookie shouldn't be sent for sub request

Commits
-------

ec38936 adapted previous commit for 2.3
119b091 [Security] Don't send remember cookie for sub request
2015-01-03 11:25:40 +01:00
Fabien Potencier
ec38936fbf adapted previous commit for 2.3 2015-01-03 11:25:34 +01:00
blanchonvincent
119b0917dc [Security] Don't send remember cookie for sub request 2015-01-03 11:24:57 +01:00
Fabien Potencier
d2e951b74b bug #12574 [HttpKernel] Fix UriSigner::check when _hash is not at the end of the uri (nyroDev)
This PR was submitted for the 2.5 branch but it was merged into the 2.3 branch instead (closes #12574).

Discussion
----------

[HttpKernel] Fix UriSigner::check when _hash is not at the end of the uri

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

I have a weird server installation behind Varnish that rewrite the signed URL to add the _hash at the end of the url queries.
Exemple :
URL called: http://exemple.com/page?foo=bar&_hash=123
URL received by PHP: http://exemple.com/page?_hash=123&foo=bar

When the _hash is not at the end of the URL, the UriSigner fail to verify it even if the _hash is correct.

The fix rewrites the check function to use parse_url and parse_str to analyse the URI and check the signature.

Commits
-------

29b217c [HttpKernel] Fix UriSigner::check when _hash is not at the end of the uri
2015-01-03 11:03:21 +01:00
nyro
29b217cf21 [HttpKernel] Fix UriSigner::check when _hash is not at the end of the uri 2015-01-03 11:03:21 +01:00
Fabien Potencier
a7d5624233 minor #13195 [Process] Fixes to executable finder tests (mpajunen)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Fixes to executable finder tests

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

A couple of fixes for ExecutableFinder tests:
- Use PHPUnit ini_set wrapper to avoid side effects.
- Skip a test on Windows (similar to an earlier test that was already skipped).
- Removed an unused variable.

Commits
-------

75d0d59 Use PHPUnit ini_set wrapper in tests
99ff8a6 [Process] Added a test skip check for Windows
5a14941 [Process] Removed unused variable assignment
2015-01-03 08:54:46 +01:00
Mikael Pajunen
75d0d593e3 Use PHPUnit ini_set wrapper in tests
PHPUnit ini_set wrapper is now used in tests to automatically reset
ini settings after the test is run. This avoids possible side effects
and test skipping.

Native ini_set is still used in DefaultCsrfProviderTest, but its
tests are run in isolation.
2015-01-02 18:15:09 +02:00
Mikael Pajunen
99ff8a6de4 [Process] Added a test skip check for Windows
The test FindProcessInOpenBasedir fails similarly to
FindWithOpenBaseDir on Windows.
2015-01-02 18:15:08 +02:00
Mikael Pajunen
5a14941a6f [Process] Removed unused variable assignment 2015-01-02 17:27:11 +02:00
Fabien Potencier
e09b4f9a5a minor #13134 [2.3] Fixes various phpdoc and coding standards. (hhamon)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] Fixes various phpdoc and coding standards.

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

Commits
-------

b83da8f Fixes various phpdoc and coding standards.
2015-01-02 10:13:41 +01:00
Hugo Hamon
b83da8f742 Fixes various phpdoc and coding standards. 2015-01-02 09:58:20 +01:00
Fabien Potencier
14ca1c537d bug #13185 Fixes Issue #13184 - incremental output getters now return empty strings (Bailey Parker)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #13185).

Discussion
----------

Fixes Issue #13184 - incremental output getters now return empty strings

fixed Issue #13184

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | Issue #13184
| License       | MIT
| Doc PR        | [`Symfony\Component\Process\Process::getIncrementalOutput()`](http://api.symfony.com/2.6/Symfony/Component/Process/Process.html#method_getIncrementalOutput), [`Symfony\Component\Process\Process::getIncrementalErrorOutput()`](http://api.symfony.com/2.6/Symfony/Component/Process/Process.html#method_getIncrementalErrorOutput)

Commits
-------

3c608eb Fixes Issue #13184 - incremental output getters now return empty strings
2015-01-02 09:09:58 +01:00
Bailey Parker
3c608ebc29 Fixes Issue #13184 - incremental output getters now return empty strings 2015-01-02 09:08:40 +01:00
Fabien Potencier
a609ca0bd0 minor #13191 [2.3] * Happy New Year 2015 * (saro0h)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] * Happy New Year 2015 *

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

Commits
-------

5a121df Updated copyright to 2015
2015-01-02 08:41:21 +01:00
Saro0h
5a121df42b Updated copyright to 2015 2015-01-01 13:56:52 +01:00
Fabien Potencier
f438eae402 minor #13147 [2.3] for consistency, use value of DIRECTORY_SEPARATOR to detect Windows (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] for consistency, use value of DIRECTORY_SEPARATOR to detect Windows

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

This commit unifies the detection of Windows builds across the Symfony
codebase.

Commits
-------

20a427d use value of DIRECTORY_SEPARATOR to detect Windows
2014-12-30 14:27:52 +01:00
Fabien Potencier
b5e09ee817 minor #13172 [Form] Remove a redundant test (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Remove a redundant test

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

As a result of changing `bind()` to `submit()` in #13161, the `testValidateTokenOnBindIfRootAndCompoundUsesTypeClassAsIntentionIfEmptyFormName()` is exactly the same as `testValidateTokenOnSubmitIfRootAndCompoundUsesTypeClassAsIntentionIfEmptyFormName()`. This makes the form tests to fail on 2.5 branch, as after a merge csrf provider is used instead of the token manager.

Commits
-------

ae10615 [Form] Remove a redundant test.
2014-12-30 14:23:26 +01:00
Jakub Zalas
ae1061564e [Form] Remove a redundant test.
This is exactly the same as testValidateTokenOnSubmitIfRootAndCompoundUsesTypeClassAsIntentionIfEmptyFormName().
2014-12-30 12:20:04 +00:00
Christian Flothmann
20a427de7c use value of DIRECTORY_SEPARATOR to detect Windows
This commit unifies the detection of Windows builds across the Symfony
codebase.
2014-12-30 12:17:23 +01:00
Fabien Potencier
844741a192 minor #13165 Fix the implementation of deprecated Locale classes (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix the implementation of deprecated Locale classes

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

The ICU component does not exist anymore, but the BC layer was still referencing it.

Commits
-------

eb0637f Fix the implementation of deprecated Locale classes
2014-12-30 09:48:31 +01:00
Joshua Thijssen
f239920342 Updated generateSql tool 2014-12-30 09:47:24 +01:00
Fabien Potencier
be979330f8 minor #13162 Fix phpdoc and coding standards (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix phpdoc and coding standards

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

This removes the unused use statements which were not catched by PHP-CS-Fixer because of string occurences. It also fixes some invalid phpdoc (scalar is not recognized as a valid type for instance).

This is complementary to https://github.com/symfony/symfony/pull/13134

Commits
-------

8cc3f6a Fix phpdoc and coding standards
2014-12-30 09:33:34 +01:00
Fabien Potencier
e0a8441f21 minor #13161 Remove usages of deprecated constants (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Remove usages of deprecated constants

| 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

This removes the usage of deprecated constants in our code.

I'm applying this in 2.3 to make merging branches easier. This is especially needed for 2.7 because of deprecation warnings added in #13060 (warnings are triggered in this PR because of these usages)

Commits
-------

6c00c22 Remove usages of deprecated constants
2014-12-30 09:31:19 +01:00
Fabien Potencier
803c916111 minor #13159 Update functional tests to use the PSR NullLogger (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Update functional tests to use the PSR NullLogger

| 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

This avoids using the deprecated NullLogger in tests.

I'm applying this in 2.3 to make merging branches easier. This is especially needed for 2.7 because of deprecation warnings added in #13060 (tests are failing in this PR currently because of that)

Commits
-------

30cff26 Update functional tests to use the PSR NullLogger
2014-12-30 09:28:51 +01:00
Fabien Potencier
e766363218 minor #13160 Replace usages of the deprecated TypeTestCase by the new one (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Replace usages of the deprecated TypeTestCase by the new one

| 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

I'm applying this in 2.3 to make merging branches easier. This is especially needed for 2.7 because of deprecation warnings added in #13060

Commits
-------

e6fa0ea Replace usages of the deprecated TypeTestCase by the new one
2014-12-30 09:27:17 +01:00
Christophe Coevoet
eb0637f675 Fix the implementation of deprecated Locale classes
The ICU component does not exist anymore.
2014-12-30 09:06:31 +01:00
Christophe Coevoet
8cc3f6aad4 Fix phpdoc and coding standards
This removes the unused use statements which were not catched by
PHP-CS-Fixer because of string occurences. It also fixes some invalid
phpdoc (scalar is not recognized as a valid type for instance).
2014-12-29 23:41:34 +01:00
Christophe Coevoet
e6fa0ea4e1 Replace usages of the deprecated TypeTestCase by the new one 2014-12-29 22:21:04 +01:00
Christophe Coevoet
6c00c226c2 Remove usages of deprecated constants 2014-12-29 22:18:50 +01:00
Christophe Coevoet
30cff2605e Update functional tests to use the PSR NullLogger
This avoids using the deprecated NullLogger in tests.
2014-12-29 21:47:13 +01:00
Fabien Potencier
0469ea82b1 bug #13145 [DomCrawler] Fix behaviour with <base> tag (dkop, WouterJ)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] Fix behaviour with <base> tag

Finishes https://github.com/symfony/symfony/issues/12283

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

Commits
-------

91447e8 Make fabbot happy
1d35e48 Clean up testing
61f22d7 [DomCrawler] fixed bug #12143
2014-12-29 11:43:29 +01:00
WouterJ
91447e881a Make fabbot happy 2014-12-29 11:04:02 +01:00
WouterJ
1d35e48755 Clean up testing 2014-12-29 11:03:52 +01:00
Fabien Potencier
459b8b6f92 minor #13144 No global state for isolated tests and other fixes (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

No global state for isolated tests and other fixes

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

By default, phpunit preserves global state for isolated processes. This made the tests break on my laptop.
Other tweaks included.
In branch 2.5, `src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php` also misses the `@preserveGlobalState disabled` annotation. Please add it when merging

Commits
-------

750f3a6 No global state for isolated tests and other fixes
2014-12-29 11:01:53 +01:00
Nicolas Grekas
750f3a62f7 No global state for isolated tests and other fixes 2014-12-29 10:34:09 +01:00
Fabien Potencier
4cc4e8a257 bug #13141 [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment

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

The default escaping strategy was set on the Twig Engine and not the Twig Environment. That's a problem under some circumstances (like what #11773 describes), but it's also much better to set everything on the Twig  Environment directly.

Commits
-------

91b24e8 [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment
2014-12-29 09:40:20 +01:00
Fabien Potencier
91b24e8f92 [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment 2014-12-29 09:39:08 +01:00
Fabien Potencier
55feca6958 bug #13114 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP head... (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP head...

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

On symfony.com, we have errors related to IP addresses in the `X-Forwarded-For` HTTP header that have a port. If that happens (I have no ideas what is doing that), the page crashes with an error like `inet_pton(): Unrecognized address 187.65.229.211:63479` (which comes from IpUtils::checkIpv6()). This fixes the root cause by removing the port.

#12572 is solving the consequence and I propose to also merge it.

Commits
-------

60ad382 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port
2014-12-29 09:20:51 +01:00
Fabien Potencier
ff079dd41e bug #12572 [HttpFoundation] fix checkip6 (Neime)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #12572).

Discussion
----------

[HttpFoundation] fix checkip6

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

I have this error ContextErrorException: Warning: inet_pton(): Unrecognized address X.X.X.X:X
in IpUtils.php line 110

X.X.X.X:X is detected as a ipv6 because HTTP_X_FORWARDED_FOR have a port.

Commits
-------

1da0ba4 [Debug] fix checkip6
2014-12-29 09:16:17 +01:00
Neime
1da0ba4150 [Debug] fix checkip6 2014-12-29 09:16:16 +01:00
Fabien Potencier
60ad382684 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port 2014-12-29 09:12:40 +01:00
Fabien Potencier
f68b7c7d9d minor #13132 [CssSelector] Use the correct cssselect library name in docblocks. (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[CssSelector] Use the correct cssselect library name in docblocks.

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

As suggested in #11894, the original python library is called [cssselect](https://github.com/SimonSapin/cssselect), not cssselector.

I also updated the README, as the cssselect was extracted as an independent library and it's no longer part of lxml.

Commits
-------

55f0d9e Update the note about origins of the CssSelector component.
1997b12 Use the correct cssselect library name in docblocks.
2014-12-27 04:31:18 +01:00
Jakub Zalas
55f0d9ed0b Update the note about origins of the CssSelector component.
The last rewrite is based on the cssselect which is no longer part of lxml, but was extracted as an independent library.
2014-12-26 23:33:10 +01:00
Jakub Zalas
1997b12f51 Use the correct cssselect library name in docblocks.
The original python library is called cssselect, not cssselector.
2014-12-26 23:22:03 +01:00
Nicolas Grekas
e10024e5f4 minor #13123 [travis] reorder matrix + prevent "Killed" jobs (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] reorder matrix + prevent "Killed" jobs

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

The new --prefer-lowest matrix line fails randomly with ["Killed" message](http://docs.travis-ci.com/user/common-build-problems/#My-build-script-is-killed-without-any-error).
Lets try reducing concurrency on this one.
The matrix is also reordered so that the slowest lines are started first.

Commits
-------

b1d47e9 [travis] reorder matrix + prevent "Killed" jobs
2014-12-26 11:30:14 +01:00
Nicolas Grekas
b1d47e94df [travis] reorder matrix + prevent "Killed" jobs 2014-12-26 11:26:07 +01:00
Fabien Potencier
1c039ce18d minor #13115 [HttpFoundation] removed wrong HTTP header (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] removed wrong HTTP header

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

Commits
-------

73dddac [HttpFoundation] removed wrong HTTP header
2014-12-26 10:45:06 +01:00
Nicolas Grekas
841f532fda minor #13118 [TwigBridge] fix form requirement (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[TwigBridge] fix form requirement

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

Commits
-------

d9053d9 [TwigBridge] fix form requirement
2014-12-26 00:18:04 +01:00
Nicolas Grekas
d9053d9b55 [TwigBridge] fix form requirement 2014-12-25 23:41:41 +01:00
Fabien Potencier
37724f01a5 minor #13104 [CssSelector] added the license of the Python library we ported to PHP (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[CssSelector] added the license of the Python library we ported to PHP

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

Commits
-------

fa36b98 [CssSelector] added the license of the Python library we ported to PHP
2014-12-25 20:43:18 +01:00