Commit Graph

16293 Commits

Author SHA1 Message Date
Bernhard Schussek 7b4a35a844 [Intl] Fixed a few bugs in TextBundleWriter 2014-09-12 13:27:08 +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
Fabien Potencier aa16baf2d4 bug #11897 [FrameworkBundle] Remove invalid markup (flack)
This PR was submitted for the 2.5 branch but it was merged into the 2.3 branch instead (closes #11897).

Discussion
----------

[FrameworkBundle] Remove invalid markup

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

Commits
-------

1fe8e31 [FrameworkBundle] Remove invalid markup
2014-09-10 15:06:13 +02:00
flack 1fe8e31514 [FrameworkBundle] Remove invalid markup 2014-09-10 15:06:13 +02:00
Fabien Potencier f5b4b115ba minor #11891 [Intl] Added "internal" tag to all classes under Symfony\Component\Intl\ResourceBundle (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Intl] Added "internal" tag to all classes under Symfony\Component\Intl\ResourceBundle

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

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.

We need to include in the update notes that users should check for usage of these classes.

Commits
-------

7fd5e8b [Intl] Added "internal" tag to all classes under Symfony\Component\Intl\ResourceBundle
2014-09-09 16:58:14 +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
Fabien Potencier f4c9c976d8 minor #11868 Remove routes for removed WebProfiler actions (Briareos)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11868).

Discussion
----------

Remove routes for removed WebProfiler actions

The import/export functionality was moved to commands in f38536ab79, but the routes were not removed.

Commits
-------

1421449 Remove routes for removed WebProfiler actions
2014-09-06 18:09:55 +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
Fabien Potencier 1893633fb3 bug #11860 [Security] Fix usage of unexistent method in DoctrineAclCache. (mauchede)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11860).

Discussion
----------

[Security] Fix usage of unexistent method in DoctrineAclCache.

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

The method `deleteByPrefix` does not exist. I replaced it by `deleteAll`: as @guilhermeblanco said, this method is not available in the interface `Cache` but it is present in the abstract class `CacheProvider`.

Commits
-------

131abd8 [Security] Fix usage of unexistent method in DoctrineAclCache.
2014-09-05 15:11:41 +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 2651c1a6a3 update CONTRIBUTORS for 2.3.19 2014-09-03 11:45:14 +02:00
Fabien Potencier 78752a66b9 updated CHANGELOG for 2.3.19 2014-09-03 11:45:01 +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 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
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
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