Commit Graph

13465 Commits

Author SHA1 Message Date
Bernhard Schussek 9052efc499 [Intl] Added exception handler to command line scripts 2014-09-12 15:40:41 +02:00
Bernhard Schussek 2349839738 bug #11905 [Intl] Removed non-working $fallback argument from ArrayAccessibleResourceBundle (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl] Removed non-working $fallback argument from ArrayAccessibleResourceBundle

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

The code in question didn't actually work. This was extracted from #9206.

Commits
-------

5feda5e [Intl] Removed non-working $fallback argument from ArrayAccessibleResourceBundle
2014-09-12 12:39:43 +02:00
Bernhard Schussek 5feda5e9a6 [Intl] Removed non-working $fallback argument from ArrayAccessibleResourceBundle 2014-09-11 18:28:58 +02:00
Jérémy JOURDIN ee75af0c89 Use separated function to resolve command and related arguments 2014-09-11 18:27:13 +02:00
Fabien Potencier a45e3da3e4 minor #11822 [Security] Use hash_equals for constant-time string comparison (again) (dunglas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Use hash_equals for constant-time string comparison (again)

| 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

Use the `hash_equals` function (introduced in PHP 5.6) for timing attack safe string comparison when available.

Add in the DocBlock that length will leak (https://github.com/symfony/symfony/pull/11797#issuecomment-53990712).

Commits
-------

3071557 [Security] Add more tests for StringUtils::equals
03bd74b [Security] Use hash_equals for constant-time string comparison
2014-09-10 15:18:42 +02:00
Fabien Potencier d4e056c877 bug #11374 [DI] Added safeguards against invalid config in the YamlFileLoader (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

[DI] Added safeguards against invalid config in the YamlFileLoader

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

Exceptions explaining the mistake are better than fatal errors or weird notices appearing when trying to deal with such invalid data.

The XML file loader is not affected by this because the data are validated with the XSD before being processed

Commits
-------

5183501 [DI] Added safeguards against invalid config in the YamlFileLoader
2014-09-10 15:14:47 +02:00
flack 1fe8e31514 [FrameworkBundle] Remove invalid markup 2014-09-10 15:06:13 +02:00
Bernhard Schussek 7fd5e8b201 [Intl] Added "internal" tag to all classes under Symfony\Component\Intl\ResourceBundle
We didn't have this tag yet when this component was first written. The code in that
namespace is only used for resource bundle generation and was never meant for public
use.
2014-09-09 16:20:39 +02:00
Fabien Potencier 91fb103a70 minor #11844 [FrameworkBundle] improve handling router script paths (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] improve handling router script paths

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

The `server:run` command switches the working directory before starting the built-in web server. Therefore, the path to a custom router script had to be specified based on the document root path and not based on the user's working directory.

Another option is to update the documentation (as started in symfony/symfony-docs#4194). Though I think the current behaviour is a bug. The intended behaviour can be derived from the command's help message:

> ```
If you have custom docroot directory layout, you can specify your own
 router script using --router option:

>   ./app/console server:run --router=app/config/router.php
```

As you can see, the path is specified based on the current working directory.

Commits
-------

0a16cf2 improve handling router script paths
2014-09-08 20:50:54 +02:00
Milos Colakovic 1421449991 Remove routes for removed WebProfiler actions
The import/export functionality was moved to commands in f38536ab79, but the routes were not removed.
2014-09-06 18:09:54 +02:00
Morgan Auchede 131abd816f [Security] Fix usage of unexistent method in DoctrineAclCache. 2014-09-05 15:11:41 +02:00
Fabien Potencier cfe60a4a47 bug #11850 [YAML] properly mask escape sequences in quoted strings (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[YAML] properly mask escape sequences in quoted strings

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

Commits
-------

a7d0cf2 properly mask escape sequences in quoted strings
2014-09-05 12:07:58 +02:00
Fabien Potencier 8897e58670 bug #11856 [FrameworkBundle] backport more error information from 2.6 to 2.3 (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] backport more error information from 2.6 to 2.3

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

Commits
-------

87449e0 backport more error information from 2.6 to 2.3
2014-09-05 10:46:07 +02:00
Christian Flothmann 87449e04f2 backport more error information from 2.6 to 2.3
The commit on master was:

server:run command: provide more error information

The server:run command didn't provide many information when the executed
command exited unexpectedly. Now, the process' exit code is passed through
and an error message is displayed.
2014-09-05 10:17:01 +02:00
Fabien Potencier 7e5ec59fc8 minor #11845 [HttpKernel] Escape ESI url in generated response (Jérémy Derussé)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Escape ESI url in generated response

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

If a template with an `<esi>` tag  is configured with an URL containing a `'` (in  `src` or `alt`) ; the HttpCache will generate invalide php code.

It's not a security issue, given the template and the `<esi>` tag is written by the developper, but, as the character quote is allowed in URL (https://tools.ietf.org/html/rfc3986) it coud be a potential bug.

Commits
-------

b044c45 Escape parameter on generated response
2014-09-05 09:35:40 +02:00
Kévin Dunglas 3071557ec8 [Security] Add more tests for StringUtils::equals 2014-09-04 23:39:11 +02:00
Kévin Dunglas 03bd74bdea [Security] Use hash_equals for constant-time string comparison 2014-09-04 23:37:08 +02:00
Christian Flothmann a7d0cf2070 properly mask escape sequences in quoted strings 2014-09-04 22:00:25 +02:00
Fabien Potencier 80536d012d bug #11843 [Yaml] improve error message when detecting unquoted asterisks (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] improve error message when detecting unquoted asterisks

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

Asterisks in unquoted strings are used in YAML to reference variables. Before Symfony 2.3.19, Symfony 2.4.9 and Symfony 2.5.4, unquoted asterisks in inlined YAML code were treated as regular strings. This was fixed for the inline parser in #11677. However, an unquoted * character now led to an error message like this:

```
PHP Warning:  array_key_exists(): The first argument should be either a string or an integer in vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php on line 409

  [Symfony\Component\Yaml\Exception\ParseException]
  Reference "" does not exist at line 171 (near "- { foo: * }").
```

Commits
-------

854e07b improve error when detecting unquoted asterisks
2014-09-04 11:57:59 +02:00
Jérémy Derussé b044c45679 Escape parameter on generated response 2014-09-03 22:47:06 +02:00
Christian Flothmann 0a16cf2102 improve handling router script paths
The `server:run` command switches the working directory before
starting the built-in web server. Therefore, the path to a custom
router script had to be specified based on the document root path
and not based on the user's working directory.
2014-09-03 22:34:28 +02:00
Christian Flothmann 854e07b1de improve error when detecting unquoted asterisks
Asterisks in unquoted strings are used in YAML to reference
variables. Before Symfony 2.3.19, Symfony 2.4.9 and Symfony 2.5.4,
unquoted asterisks in inlined YAML code were treated as regular
strings. This was fixed for the inline parser in #11677. However, an
unquoted * character now led to an error message like this:

```
PHP Warning:  array_key_exists(): The first argument should be either a string or an integer in vendor/symfony/symfony/src/Symfony/Component/Yaml/Inline.php on line 409

  [Symfony\Component\Yaml\Exception\ParseException]
  Reference "" does not exist at line 171 (near "- { foo: * }").
```
2014-09-03 21:08:43 +02:00
Fabien Potencier 1033dc59cd bumped Symfony version to 2.3.20 2014-09-03 14:50:59 +02:00
Fabien Potencier 1fc0575804 updated VERSION for 2.3.19 2014-09-03 11:45:27 +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 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
Christophe Coevoet 5183501e0b [DI] Added safeguards against invalid config in the YamlFileLoader
Exceptions explaining the mistake are better than fatal errors or weird
notices appearing when trying to deal with such invalid data.
Closes #11333
2014-09-02 09:31:18 +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 3b4046e894 [HttpFoundation] added some missing tests 2014-09-01 23:16:21 +02:00
DQNEO 05f5860c56 [HttpFoundation] Improve string values in test codes 2014-09-01 13:58:07 +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
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
Michael Tibben a8a40fcb9e [FrameworkBundle] PhpExtractor bugfix and improvements 2014-08-31 06:14:42 +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
Damian Sromek c056a9c426 [Filesystem] Add FTP stream wrapper context option to enable overwrite (override) 2014-08-31 05:30:23 +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
Christophe Coevoet 37f2c3dabd bug #11160 [DoctrineBridge] Abstract Doctrine Subscribers with tags (merk)
This PR was merged into the 2.3 branch.

Discussion
----------

[DoctrineBridge] Abstract Doctrine Subscribers with tags

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

I've hit a problem with some doctrine listeners, built by decorating an abstract definition.

I want the abstract definition to hold the tag, however because the RegisterEventListenersAndSubscribersPass runs before abstract definitions are removed, they get added as method calls to the EventManager definition, which once the abstract service is removed, we end up with a method call that breaks the container.

I don't know if this is the best approach, it might be better not to return abstract services when calling `findTaggedServiceIds` instead?

Commits
-------

cbcf513 Disallow abstract definitions from doctrine event listener registration
2014-08-28 21:58:08 +02:00
Fabien Potencier 8605c42441 [ClassLoader] simplified phpdoc 2014-08-28 16:35:12 +02:00
Fabien Potencier f7769b52f1 bug #11768 [ClassLoader] Add a __call() method to XcacheClassLoader (tstoeckler)
This PR was squashed before being merged into the 2.3 branch (closes #11768).

Discussion
----------

[ClassLoader] Add a __call() method to XcacheClassLoader

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

Commits
-------

dd0d6af [ClassLoader] Add a __call() method to XcacheClassLoader
2014-08-28 16:33:47 +02:00