Commit Graph

17912 Commits

Author SHA1 Message Date
Fabien Potencier
1ec88bed2c Merge branch '2.4' into 2.5
* 2.4:
  Revert "minor #11808 [Security] Add more tests for StringUtils::equals (dunglas)"
2014-09-03 11:22:15 +02:00
Fabien Potencier
1205e75f7a Revert "minor #11808 [Security] Add more tests for StringUtils::equals (dunglas)"
This reverts commit 8fdfb6fc35, reversing
changes made to e99dfdf87a.
2014-09-03 11:22:04 +02:00
Fabien Potencier
c1b1b109b4 Merge branch '2.4' into 2.5
* 2.4: (21 commits)
  [HttpKernel] fixed some unit tests for 2.4 (signature now uses SHA256 instead of MD5)
  [HttpKernel] simplified code
  [HttpKernel] fixed internal fragment handling
  fixing yaml indentation
  [WebProfiler] replaced the import/export feature from the web interface to a CLI tool
  Forced all fragment uris to be signed, even for ESI
  Add tests and more assertions
  [FrameworkBundle][Translator] Validate locales.
  [HttpFoundation] added some missing tests
  [HttpFoundation] Improve string values in test codes
  [Security] Add more tests for StringUtils::equals
  fix comment: not fourth but sixth argument
  fixing typo in a comment
  [FrameworkBundle] fixed CS
  [FrameworkBundle] PhpExtractor bugfix and improvements
  [Finder] Fix findertest readability
  [Filesystem] Add FTP stream wrapper context option to enable overwrite (override)
  fix parsing of Authorization header
  Test examples from Drupal SA-CORE-2014-003
  Fix potential DoS when parsing HOST
  ...

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php
	src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php
2014-09-03 11:00:14 +02:00
Fabien Potencier
4ef1328f32 [HttpKernel] fixed some unit tests for 2.4 (signature now uses SHA256 instead of MD5) 2014-09-03 10:52:18 +02:00
Fabien Potencier
f6e9248c0c [HttpKernel] simplified code 2014-09-03 10:44:56 +02:00
Fabien Potencier
8358ebb15a Merge branch '2.3' into 2.4
* 2.3:
  [HttpKernel] fixed internal fragment handling
  fixing yaml indentation
  [WebProfiler] replaced the import/export feature from the web interface to a CLI tool
  Forced all fragment uris to be signed, even for ESI
  Add tests and more assertions
  [FrameworkBundle][Translator] Validate locales.
  [HttpFoundation] added some missing tests
  [HttpFoundation] Improve string values in test codes
  fix comment: not fourth but sixth argument
  fixing typo in a comment
  [FrameworkBundle] fixed CS
  [FrameworkBundle] PhpExtractor bugfix and improvements
  [Finder] Fix findertest readability
  [Filesystem] Add FTP stream wrapper context option to enable overwrite (override)
  fix parsing of Authorization header
  Test examples from Drupal SA-CORE-2014-003
  Fix potential DoS when parsing HOST
  Made optimization deprecating modulus operator

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Resources/config/esi.xml
	src/Symfony/Component/HttpFoundation/Request.php
	src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
	src/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php
2014-09-03 10:42:07 +02:00
Fabien Potencier
23eb033abb [HttpKernel] fixed internal fragment handling 2014-09-03 10:09:50 +02:00
Fabien Potencier
b60b5d4b24 security #11832 n/a (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

f38536a [WebProfiler] replaced the import/export feature from the web interface to a CLI tool
2014-09-03 09:40:30 +02:00
Fabien Potencier
439c5a3357 security #11831 n/a (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

654b1f2 Forced all fragment uris to be signed, even for ESI
2014-09-03 09:40:02 +02:00
Fabien Potencier
c558b159fe security #11830 n/a (aitboudad, Jérémy Derussé)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

9e1bc22 Add tests and more assertions
101a3b7 [FrameworkBundle][Translator] Validate locales.
2014-09-03 09:39:11 +02:00
Fabien Potencier
e30bb17b7e security #11829 n/a (damz, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

3b4046e [HttpFoundation] added some missing tests
cefe237 fix parsing of Authorization header
2014-09-03 09:38:23 +02:00
Fabien Potencier
0aaabbfe8b security #11828 n/a (nicolas-grekas, larowlan)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

1ee96a8 Test examples from Drupal SA-CORE-2014-003
5506ee8 Fix potential DoS when parsing HOST
2014-09-03 09:37:21 +02:00
Fabien Potencier
85d6cf8f42 minor #11825 fixing yaml indentation (cordoval)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11825).

Discussion
----------

fixing yaml indentation

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

Commits
-------

3bba329 fixing yaml indentation
2014-09-02 18:01:12 +02:00
Luis Cordova
3bba329775 fixing yaml indentation 2014-09-02 18:01:12 +02:00
Fabien Potencier
36b0e72874 minor #11823 Unexpexted "));" (dominikjaglo)
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #11823).

Discussion
----------

Unexpexted "));"

removed unexpected "));"

Commits
-------

88f8b3f Unexpexted ));"
2014-09-02 15:16:13 +02:00
Dominik Jagło
88f8b3f173 Unexpexted ));" 2014-09-02 15:16:13 +02:00
Fabien Potencier
f38536ab79 [WebProfiler] replaced the import/export feature from the web interface to a CLI tool 2014-09-02 15:08:29 +02:00
Christophe Coevoet
654b1f281e Forced all fragment uris to be signed, even for ESI 2014-09-02 09:39:57 +02:00
Jérémy Derussé
9e1bc22388 Add tests and more assertions 2014-09-02 09:12:49 +02:00
Abdellatif Ait boudad
101a3b7b50 [FrameworkBundle][Translator] Validate locales. 2014-09-02 09:12:49 +02:00
Fabien Potencier
8fdfb6fc35 minor #11808 [Security] Add more tests for StringUtils::equals (dunglas)
This PR was merged into the 2.4 branch.

Discussion
----------

[Security] Add more tests for StringUtils::equals

| 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

More tests for `StringUtils::equals`.

Commits
-------

a676863 [Security] Add more tests for StringUtils::equals
2014-09-02 09:07:06 +02:00
Fabien Potencier
3b4046e894 [HttpFoundation] added some missing tests 2014-09-01 23:16:21 +02:00
Fabien Potencier
b554961a5b minor #11812 [HttpFoundation] Improve string values in test codes (DQNEO)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11812).

Discussion
----------

[HttpFoundation] Improve string values in test codes

I made the meanings of string literals more clear.

| 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

Commits
-------

05f5860 [HttpFoundation] Improve string values in test codes
2014-09-01 13:58:07 +02:00
DQNEO
05f5860c56 [HttpFoundation] Improve string values in test codes 2014-09-01 13:58:07 +02:00
Kévin Dunglas
a6768635f0 [Security] Add more tests for StringUtils::equals 2014-09-01 13:47:09 +02:00
Fabien Potencier
32f1143e60 minor #11814 [Security] fixing typo in a comment (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] fixing typo in a comment

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

As reported [here](https://github.com/symfony/symfony/pull/11574/files#r16934052).

Commits
-------

faefd66 fixing typo in a comment
2014-09-01 13:45:45 +02:00
Fabien Potencier
2aed56f6e8 minor #11811 [HttpFoundation] fix comment: not fourth but sixth argument (DQNEO)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11811).

Discussion
----------

[HttpFoundation] fix comment: not fourth but sixth argument

$server is the **sixth** argument, not fourth.

| 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

Commits
-------

42841e8 fix comment: not fourth but sixth argument
2014-09-01 13:44:29 +02:00
DQNEO
42841e845b fix comment: not fourth but sixth argument 2014-09-01 13:44:28 +02:00
Christian Flothmann
faefd66b10 fixing typo in a comment 2014-09-01 09:40:12 +02:00
Fabien Potencier
62bc2c4cf5 [FrameworkBundle] fixed CS 2014-08-31 06:17:40 +02:00
Fabien Potencier
d0c3ffa288 bug #10197 [FrameworkBundle] PhpExtractor bugfix and improvements (mtibben)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10197).

Discussion
----------

[FrameworkBundle] PhpExtractor bugfix and improvements

PhpExtractor currently only handles simple strings which match an overly-specific token sequence.

This change adds support for
- heredoc / nowdoc
- inconsistent whitespace when parsing
- escaped sequences in strings
- `transChoice`

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

Commits
-------

a8a40fc [FrameworkBundle] PhpExtractor bugfix and improvements
2014-08-31 06:14:43 +02:00
Michael Tibben
a8a40fcb9e [FrameworkBundle] PhpExtractor bugfix and improvements 2014-08-31 06:14:42 +02:00
Fabien Potencier
55d17fad19 minor #11635 [Finder] Fix findertest readability (1emming)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11635).

Discussion
----------

[Finder] Fix findertest readability

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | part of #11631, #11588
| License       | MIT

When running on Ubuntu it is hard to setup an account that allows the `chmod` to downgrade the rights on a directory but is not allow to read from the downgraded directory.

Commits
-------

8a47b62 [Finder] Fix findertest readability
2014-08-31 06:03:33 +02:00
1emming
8a47b62bd3 [Finder] Fix findertest readability 2014-08-31 06:03:32 +02:00
Fabien Potencier
b5d0501860 minor #11574 [Security] Made optimization on constant-time algorithm removing modulus operator (yosmanyga)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Made optimization on constant-time algorithm removing modulus operator

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

This fix improves the constant-time algorithm used to compare strings, as it removes the `%` operator inside the loop.

Commits
-------

000bd0d Made optimization deprecating modulus operator
2014-08-31 05:48:56 +02:00
Fabien Potencier
94990a2769 minor #11707 [Validator] Test that validateProperty() works if no constraint is defined (xabbuh)
This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] Test that validateProperty() works if no constraint is defined

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (2.3 has to be merged into 2.5 first)
| Fixed tickets | #11604, #11614
| License       | MIT
| Doc PR        |

Adds a test case for #11604 to avoid regressions. The actual issue has been fixed in Symfony 2.3 with the merge of #11615.

Commits
-------

a47a884 add test for #11604
2014-08-31 05:34:15 +02:00
Fabien Potencier
bdb01a68d2 bug #11772 [Filesystem] Add FTP stream wrapper context option to enable overwrite (Damian Sromek)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11772).

Discussion
----------

[Filesystem] Add FTP stream wrapper context option to enable overwrite

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

Without this change it's not possible to override a file on FTP by calling Filesystem::copy($originFile, $targetFile, true) as PHP/FTP server responds with error like:

fopen(ftp://...@ftp/file.txt): failed to open stream: Remote file already exists and overwrite context option not specified FTP server reports 213 166440 []

TODO: Write an integration tests? How? Use some real FTP server?

Commits
-------

c056a9c [Filesystem] Add FTP stream wrapper context option to enable overwrite (override)
2014-08-31 05:30:41 +02:00
Damian Sromek
c056a9c426 [Filesystem] Add FTP stream wrapper context option to enable overwrite (override) 2014-08-31 05:30:23 +02:00
Fabien Potencier
6ff62cc675 Merge branch '2.4' into 2.5
* 2.4:
  fix typos
  [HttpKernel] add use statement for phpdoc
  Disabled the PHPUnit self-update on Travis
  [ClassLoader] simplified phpdoc
  [ClassLoader] Add a __call() method to XcacheClassLoader
  fix some minor typos in tests
  [Yaml] fixed mapping keys containing a quoted #
  Added fixture to test parsing of hash keys ending with a space and #
  [Filesystem Component] mkdir race condition fix #11626
  [Validator] reverted permissions change on translation files
  Fixed Factory services not within the ServiceReferenceGraph.
  [CssSelector] Fix URL to SimonSapin/cssselect repo
  [Validator] Fixed wrong translation keys/messages for Collection constraint. The error messages for a missing field and an unexpected field did not match the Contraint class
  [YAML] resolve variables in inlined YAML
  Disallow abstract definitions from doctrine event listener registration

Conflicts:
	src/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php
	src/Symfony/Component/Yaml/Inline.php
2014-08-31 05:22:04 +02:00
Fabien Potencier
e99dfdf87a Merge branch '2.3' into 2.4
* 2.3:
  [HttpKernel] add use statement for phpdoc
  Disabled the PHPUnit self-update on Travis
  [ClassLoader] simplified phpdoc
  [ClassLoader] Add a __call() method to XcacheClassLoader
  fix some minor typos in tests
  [Yaml] fixed mapping keys containing a quoted #
  Added fixture to test parsing of hash keys ending with a space and #
  [Filesystem Component] mkdir race condition fix #11626
  [Validator] reverted permissions change on translation files
  Fixed Factory services not within the ServiceReferenceGraph.
  [CssSelector] Fix URL to SimonSapin/cssselect repo
  [Validator] Fixed wrong translation keys/messages for Collection constraint. The error messages for a missing field and an unexpected field did not match the Contraint class
  [YAML] resolve variables in inlined YAML
  Disallow abstract definitions from doctrine event listener registration

Conflicts:
	src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php
	src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPassTest.php
	src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php
	src/Symfony/Component/Filesystem/Filesystem.php
2014-08-31 05:18:18 +02:00
Fabien Potencier
fb3be10089 minor #11804 fix typos (Tobion)
This PR was merged into the 2.4 branch.

Discussion
----------

fix typos

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

Commits
-------

e91269b fix typos
2014-08-31 05:02:59 +02:00
Tobias Schultze
e91269bd7c fix typos 2014-08-30 22:47:12 +02:00
Fabien Potencier
06de353635 bug #11791 [Process] fix mustRun() in sigchild environments (xabbuh)
This PR was merged into the 2.5 branch.

Discussion
----------

[Process] fix mustRun() in sigchild environments

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

When being run in sigchild environments, the sigchild compatibility mode needs to be enabled to be able to call `getExitCode()`. Since `mustRun()` uses `getExitCode()` to determine whether or not a process terminated successfully, it cannot be used in sigchild environments when the sigchild compatibility mode is disabled.

Commits
-------

b764f6c fix mustRun() in sigchild environments
2014-08-30 09:50:17 +02:00
Fabien Potencier
2c9496bc77 minor #11802 [HttpKernel] add use statement for phpdoc (Miliooo)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11802).

Discussion
----------

[HttpKernel] add use statement for phpdoc

| Q             | A
| ------------- | ---
| Fixed tickets | https://github.com/symfony/symfony/issues/11801
| License       | MIT

Added use statement for the Phpdoc

Commits
-------

0010fba [HttpKernel] add use statement for phpdoc
2014-08-30 09:46:13 +02:00
Miliooo
0010fba8b1 [HttpKernel] add use statement for phpdoc 2014-08-30 09:46:13 +02:00
Fabien Potencier
c730fc6f77 bug #11788 [Yaml] fixed mapping keys containing a quoted # (hvt, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] fixed mapping keys containing a quoted #

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

Commits
-------

110f999 [Yaml] fixed mapping keys containing a quoted #
8ba3b28 Added fixture to test parsing of hash keys ending with a space and #
2014-08-29 11:22:54 +02:00
Fabien Potencier
c42302ef3b minor #11793 Disabled the PHPUnit self-update on Travis (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Disabled the PHPUnit self-update on Travis

The 4.2.2 release available on Travis currently ships with a broken self-update command. Given that it is new enough to contain the fixes for the other bugs affecting the build, it is fine to keep using the available phar without updating it.

This avoids making all builds except 5.3.3 fail before running tests.

FYI, the bug itself is already fixed in PHPUnit so 4.2.3 will have a working command.

Commits
-------

0fca352 Disabled the PHPUnit self-update on Travis
2014-08-29 11:20:55 +02:00
Fabien Potencier
b74acdb797 bug #11787 fixed DateComparator if file does not exist (avi123)
This PR was squashed before being merged into the 2.5 branch (closes #11787).

Discussion
----------

fixed DateComparator if file does not exist

Description:
When a file is deleted after the iterator is created, the accept function throws the following exception: SplFileInfo::getMTime(): stat failed.  This is because the function doesn't check first for the existence of the file.  In theory, a deletion between existence being checked and getMTime getting called would still result in this error, but the risk area for this race condition is much smaller than the current risk area.

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

Commits
-------

c6e9e06 fixed DateComparator if file does not exist
2014-08-29 11:14:46 +02:00
avi123
c6e9e06abb fixed DateComparator if file does not exist 2014-08-29 11:14:43 +02:00
Christophe Coevoet
0fca35276a Disabled the PHPUnit self-update on Travis
The 4.2.2 release available on Travis currently ships with a broken
self-update command. Given that it is new enough to contain the fixes for
the other bugs affecting the build, it is fine to keep using the available
phar without updating it.
2014-08-28 22:43:41 +02:00