Commit Graph

13465 Commits

Author SHA1 Message Date
Gordon Franke
c70a226121 change command to which available under most unix systems
agree i will change it which is available under suse, ubuntu, debian, fedora, bsd
2014-08-07 14:55:21 +02:00
Gordon Franke
85e77b14f7 add way to test command under windows 2014-08-07 09:02:32 +02:00
Gordon Franke
4fa9288fda fix shell command injection 2014-08-07 09:01:16 +02:00
Issei.M
e77022ba6d [Form] allowed CallbackTransformer to use callable 2014-08-06 15:53:52 +02:00
Bernhard Schussek
6dd3946a7e [Process] Added process synchronization to the incremental output tests
The tests currently fail from time to time if the executing machine is under
heavy load. This leads to false negatives on Travis CI.

A side effect of the change is that the tests are much faster now.
2014-08-06 15:45:25 +02:00
Peter Kruithof
5ecc449898 Fixed relative redirects for ambiguous paths 2014-08-05 09:20:55 +02:00
Walther Lalk
39973de230 [BrowserKit] Fix browser kit redirect with ports 2014-08-05 09:17:23 +02:00
Fabien Potencier
e76561dbc0 bug #11545 [Bundle][FrameworkBundle] built-in server: exit when docroot does not exist (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Bundle][FrameworkBundle] built-in server: exit when docroot does not exist

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

When the server:run command is run with an invalid document root
directory (for example, when being in the app directory and not
changing the document root to ../web/), the command crashes on Windows
with a 267 exit code. On Linux, the server starts but just publishes
internal server errors.

Commits
-------

f143254 built-in server: exit when docroot does not exist
2014-08-05 09:12:57 +02:00
Emanuele Iannone
16bd88e61f [TwigBridge] [Form] Fixed some extra empty spaces 2014-08-05 09:07:37 +02:00
Fabien Potencier
1ba7c72b09 minor #11550 [Form] fix whitespace in Twig form template (craue)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] fix whitespace in Twig form template

| Q             | A
| ------------- | ---
| Bug fix?      | kind of (after updating from 2.3.17 to 2.3.18, some of my tests were broken because of this)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | they should, let's see what Travis has to say...
| Fixed tickets | --
| License       | MIT
| Doc PR        | --

This fixes some whitespace rendering.

after merging #11386:
```html
<input type="text" id="myfield" name="myfield"     value="blah" />
```

before merging #11386 and with this PR again:
```html
<input type="text" id="myfield" name="myfield" value="blah" />
```

Commits
-------

8504d02 fixed whitespace in Twig form template
2014-08-05 09:06:43 +02:00
Seb Koelen
9b550d6324 Plural fix 2014-08-05 09:05:24 +02:00
Fabien Potencier
59d6912b40 bug #11558 [DependencyInjection] Fixed missing 'factory-class' attribute in XmlDumper output (kerdany)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Fixed missing 'factory-class' attribute in XmlDumper output

| 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

Problem: XmlDumper doesn't write 'factory-class' XML attribute for definitions on which setFactoryClass() was called.

Impact: Container[Builder] to throws an exception when the relevant service is being requested/initiated after loading the dumped XML.
`Uncaught Exception Symfony\Component\DependencyInjection\Exception\RuntimeException: "Cannot create service "xxx" from factory method without a factory service or factory class." at /<path>/<to>//DependencyInjection/ContainerBuilder.php`

Solution: Made XmlDumper write the 'factory-class' attribute, and updated the relevant test fixture.

Another related problem, is that XMLFileLoader doesn't complain if the 'factory-class' attribute is missing for a 'service' elements that include 'factory-method' attribute, resulting in an ill-configured Definition object in the ContainerBuilder. I'll post an issue/ticket, and probably send another PR for that.

Commits
-------

18e3e6f [DependencyInjection] fixed missing 'factory-class' attribute in XmlDumper output
2014-08-05 09:04:05 +02:00
Bernhard Schussek
273671ec59 [Validator] Convert objects to string in comparison validators. Reapplies 6cf5e0812e 2014-08-04 12:43:57 +02:00
Fabien Potencier
99ee01d482 removed some .gitattributes that should have been removed a lot time ago 2014-08-04 12:32:26 +02:00
moldcraft
0c6f750c1e Fix incorrect romanian plural translations 2014-08-04 11:02:01 +02:00
Hany el-Kerdany
18e3e6fe20 [DependencyInjection] fixed missing 'factory-class' attribute in XmlDumper output
Symfony\Component\DependencyInjection\Dumper\XmlDumper didn't write 'factory-class' XML attribute for definitions on which setFactoryClass() was called.

This caused the Container[Builder] to throw an exception when the relevant service is being requested/initiated after loading the dumped XML:

`Uncaught Exception Symfony\Component\DependencyInjection\Exception\RuntimeException: "Cannot create service "xxx" from factory method without a factory service or factory class." at /<path>/<to>/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerBuilder.php`

Fixed the problem, and updated the relevant test fixture.
2014-08-04 10:10:46 +03:00
Fabien Potencier
9ac2234eb8 bug #11548 [Component][DomCrawler] fix axes handling in Crawler::filterXPath() (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Component][DomCrawler] fix axes handling in Crawler::filterXPath()

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

Due to some limitations in the ``relativize()`` method, it was not possible to use XPath axes other than ``descendant`` or ``descendant-or-self`` in the ``filterXPath()`` method of the ``Crawler`` class. This commit adds support for the ``ancestor``, ``ancestor-or-self``, ``attribute``, ``child``, ``following``, ``following-sibling``, ``parent``, ``preceding``, ``preceding-sibling`` and ``self`` axes.

The only axis missing after this is the ``namespace`` axis. Filtering for namespace nodes returns ``DOMNameSpaceNode`` instances which can't be passed to the ``add()`` method.

Commits
-------

8dc322b fix axes handling in Crawler::filterXPath()
2014-08-03 08:32:28 +02:00
Christian Raue
8504d02c51 fixed whitespace in Twig form template 2014-08-02 16:06:49 +02:00
Christian Flothmann
8dc322be34 fix axes handling in Crawler::filterXPath()
Due to some limitations in the relativize() method, it was not
possible to use XPath axes other than descendant or descendant-or-self
in the filterXPath() method of the Crawler class. This commit adds
support for the ancestor, ancestor-or-self, attribute, child,
following, following-sibling, parent, preceding, preceding-sibling and
self axes.
2014-08-02 10:47:58 +02:00
Fabien Potencier
abf2edf81a minor #11483 fix some docblocks (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

fix some docblocks

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

Commits
-------

1775da5 fix some docblocks
2014-08-02 09:53:48 +02:00
Christian Flothmann
f143254220 built-in server: exit when docroot does not exist
When the server:run command is run with an invalid document root
directory (for example, when being in the app directory and not
changing the document root to ../web/), the command crashes on Windows
with a 267 exit code. On Linux, the server starts but just publishes
internal server errors.
2014-08-02 09:12:28 +02:00
Christian Flothmann
1775da5925 fix some docblocks 2014-08-02 08:27:27 +02:00
sun
440322effc Fixed self-reference in 'service_container' service breaks garbage collection (and clone). 2014-08-02 08:06:01 +02:00
Jakub Zalas
e40f24f0a9 [Process] Fix tests when pcntl is not available. 2014-08-01 11:51:55 +01:00
Fabien Potencier
a292a489c5 minor #11537 Make builds green again (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

Make builds green again

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

This PR rolls back changes made to the fixture and generated files in e9022adaef (#11512).

Commits
-------

88b4e70 [DependencyInjection] Roll back changes made to generated files.
f89811d [Console] Roll back changes made to fixture files.
2014-08-01 08:16:34 +02:00
Fabien Potencier
73ddf39ffc bug #11428 [Serializer] properly handle null data when denormalizing (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Serializer] properly handle null data when denormalizing

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

Commits
-------

123fc62 properly handle null data when denormalizing
2014-08-01 08:14:57 +02:00
Jakub Zalas
88b4e7008d [DependencyInjection] Roll back changes made to generated files.
Original change was made in e9022adaef.
2014-07-31 22:03:37 +01:00
Jakub Zalas
f89811d8d1 [Console] Roll back changes made to fixture files.
Original change was made in e9022adaef.
2014-07-31 21:49:10 +01:00
Martin Hasoň
c689186674 [WebProfilerBundle] Fixed double height of canvas 2014-07-31 16:08:09 +02:00
Bernhard Schussek
7d7b5c724f bug #10687 [Validator] Fixed string conversion in constraint violations (eagleoneraptor, webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Fixed string conversion in constraint violations

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

Commits
-------

32ae95b [Validator] Added more detailed inline documentation
08ea6d3 [Validator] Removed information from the violation output if the value is an array, object or resource
d6a783f [Validator] Renamed valueToString() to formatValue(); added missing formatValue() calls
71897d7 [Validator] Fixed CS
cea4155 [Validator] Fixed date-to-string conversion tests to match ICU 51
5aa7e6d [Validator] Added "{{ value }}" parameters where they were missing
f329552 [Validator] Simplified and explained the LuhnValidator
bff09f2 [Validator] Simplified IssnValidator
224e70f [Validator] Fixed and simplified IsbnValidator
fd58870 [Validator] Simplified IBAN validation algorithm
97243bc [Validator] Fixed value-to-string conversion in constraint violations
75e8815 [Validator] Fix constraint violation message parameterization
2014-07-30 14:38:50 +02:00
Bernhard Schussek
32ae95bdda [Validator] Added more detailed inline documentation 2014-07-30 14:36:14 +02:00
Bernhard Schussek
08ea6d3621 [Validator] Removed information from the violation output if the value is an array, object or resource
This was decided in the discussion of #10687.
2014-07-30 14:36:07 +02:00
Yassine Guedidi
777666fac1 [HttpFoundation] Update QUERY_STRING when overrideGlobals 2014-07-30 12:14:11 +02:00
Fabien Potencier
71edf38d59 partially reverted previous commit 2014-07-29 20:14:16 +02:00
Fabien Potencier
e9022adaef fixed CS 2014-07-29 20:09:11 +02:00
g123456789l
d4323951f2 Update validators.eu.xlf
Spelling of 'CSRF' was incorrect
2014-07-28 11:30:47 +02:00
Fabien Potencier
24cd42555c bug #11475 [EventDispatcher] don't count empty listeners (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[EventDispatcher] don't count empty listeners

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

When event listeners for certain events are removed from the event
dispatcher, empty arrays are not being removed. Therefore, counting
on empty arrays leads to wrong results of the hasListeners() method.

Thanks to @mlindenb for discovering this an proposing a solution.

Commits
-------

fdbb04a [EventDispatcher] don't count empty listeners
2014-07-27 10:29:33 +02:00
Fabien Potencier
ff4a37ff24 minor #11484 remove unused imports (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

remove unused imports

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

Commits
-------

9cd059e remove unused imports
2014-07-27 10:26:10 +02:00
Fabien Potencier
0bce1483c1 fixed CS 2014-07-27 10:25:12 +02:00
Christian Flothmann
9cd059ee1f remove unused imports 2014-07-26 20:24:56 +02:00
WouterJ
be04c5000c Unify null comparisons 2014-07-26 11:54:23 +02:00
Christian Flothmann
fdbb04a6ac [EventDispatcher] don't count empty listeners
When event listeners for certain events are removed from the event
dispatcher, empty arrays are not being removed. Therefore, counting
on empty arrays leads to wrong results of the hasListeners() method.
2014-07-25 17:00:14 +02:00
Romain Neutron
5939d34c17 [Process] Fix unit tests in sigchild environment 2014-07-25 10:39:28 +02:00
Christian Flothmann
eb68662360 [Process] fix signal handling in wait()
wait() throws an exception when the process was terminated by a signal.
This should not happen when the termination was requested by calling
either the stop() or the signal() method (for example, inside a callback
which is passed to wait()).
2014-07-25 10:39:21 +02:00
Fabien Potencier
94ffc4fab2 bug #11469 [BrowserKit] Fixed server HTTP_HOST port uri conversion (bcremer, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

 [BrowserKit] Fixed server HTTP_HOST port uri conversion

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

See #11356

Commits
-------

103fd88 [BrowserKit] refactor code and fix unquoted regex
f401ab9 Fixed server HTTP_HOST port uri conversion
2014-07-25 08:30:34 +02:00
Fabien Potencier
103fd88b40 [BrowserKit] refactor code and fix unquoted regex 2014-07-25 07:47:26 +02:00
Benjamin Cremer
f401ab9032 Fixed server HTTP_HOST port uri conversion 2014-07-25 07:41:17 +02:00
Fabien Potencier
045cbc53cc bug #11425 Fix issue described in #11421 (Ben, ben-rosio)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix issue described in #11421

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

This pull request fixes the issue described in #11421.  It also adds a test for the issue.  The issue is present in 2.0 forward, but I decided to fix it on the 2.3 branch so that I could also write a test for it (2.0 had no tests for the Process component, and 2.1 and 2.2 didn't have tests for the `ExecutableFinder` class).

Commits
-------

4cf50e8 Bring code into standard
9f4313c [Process] Add test to verify fix for issue #11421
02eb765 [Process] Fixes issue #11421
2014-07-25 07:28:54 +02:00
Fabien Potencier
f5bfa9bc9e bug #11423 Pass a Scope instance instead of a scope name when cloning a container in the GrahpvizDumper (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

Pass a Scope instance instead of a scope name when cloning a container in the GrahpvizDumper

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

Commits
-------

6787669 [DependencyInjection] Pass a Scope instance instead of a scope name.
2014-07-25 07:22:20 +02:00
Christian Flothmann
123fc62652 properly handle null data when denormalizing
If null is passed to denormalize(), no property values can be set on
the denormalized object. Additionally, this fixes passing values to
the denormalized object's constructor if the incoming data is an object.
2014-07-24 20:40:16 +02:00
Grégoire Pineau
c9742efe99 [Translator] Use quote to surround invalid locale 2014-07-24 18:59:28 +02:00
Bernhard Schussek
d6a783f989 [Validator] Renamed valueToString() to formatValue(); added missing formatValue() calls 2014-07-24 16:57:54 +02:00
Bernhard Schussek
71897d7e35 [Validator] Fixed CS 2014-07-24 13:57:51 +02:00
Bernhard Schussek
cea4155d39 [Validator] Fixed date-to-string conversion tests to match ICU 51 2014-07-24 13:57:51 +02:00
Bernhard Schussek
5aa7e6dbe0 [Validator] Added "{{ value }}" parameters where they were missing 2014-07-24 13:57:51 +02:00
Bernhard Schussek
f3295522ef [Validator] Simplified and explained the LuhnValidator 2014-07-24 13:57:51 +02:00
Bernhard Schussek
bff09f210b [Validator] Simplified IssnValidator 2014-07-24 13:57:51 +02:00
Bernhard Schussek
224e70f709 [Validator] Fixed and simplified IsbnValidator 2014-07-24 13:57:51 +02:00
Bernhard Schussek
fd58870ac0 [Validator] Simplified IBAN validation algorithm 2014-07-24 13:57:51 +02:00
Bernhard Schussek
97243bcd02 [Validator] Fixed value-to-string conversion in constraint violations 2014-07-24 13:57:51 +02:00
Damián Nohales
75e8815566 [Validator] Fix constraint violation message parameterization 2014-07-24 13:57:51 +02:00
Fabien Potencier
4dbe0e1c34 bug #11120 [2.3][Process] Reduce I/O load on Windows platform (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Process] Reduce I/O load on Windows platform

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

When using file handles, no `stream_select` call is done.
On linux platforms, `stream_select` introduce a sleep as it has 0.2s timeout, there is no such pause on Windows, producing lot's of disk I/Os when reading file handles

Commits
-------

ff0bb01 [Process] Reduce I/O load on Windows platform
2014-07-23 17:11:31 +02:00
Fabien Potencier
797d8141e3 bug #11342 [2.3][Form] Check if IntlDateFormatter constructor returned a valid object before using it (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Form] Check if IntlDateFormatter constructor returned a valid object before using it

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

`IntlDateFormatter` constructor [may return false](http://www.php.net/manual/en/intldateformatter.create.php#refsect1-intldateformatter.create-returnvalues). This patches avoids fatal errors in these cases

This PR replaces #11334

Commits
-------

ebf967d [Form] Check if IntlDateFormatter constructor returned a valid object before using it
2014-07-23 16:33:41 +02:00
Jérémy Derussé
537c39b11e Optimize assertLocale regexp 2014-07-22 23:54:07 +02:00
Ben
4cf50e8d30 Bring code into standard 2014-07-20 22:50:55 -06:00
Ben
9f4313cf6f [Process] Add test to verify fix for issue #11421 2014-07-19 17:48:53 -06:00
Ben
02eb765a9c [Process] Fixes issue #11421 2014-07-19 17:29:08 -06:00
Jakub Zalas
678766900b [DependencyInjection] Pass a Scope instance instead of a scope name. 2014-07-19 21:50:43 +01:00
Fabien Potencier
9572918064 bug #11411 [Validator] Backported #11410 to 2.3: Object initializers are called only once per object (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Backported #11410 to 2.3: Object initializers are called only once per object

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

Before, object initializers were called multiple times if an object was validated in different groups in the same validation run. The initializers, however, are not aware of the current validation group, so calling them more than once does not make sense.

Now, object initializers are called exactly once per validated object.

See #11410

Commits
-------

291cbf9 [Validator] Backported #11410 to 2.3: Object initializers are called only once per object
2014-07-18 11:07:06 +02:00
Bernhard Schussek
291cbf9efa [Validator] Backported #11410 to 2.3: Object initializers are called only once per object 2014-07-18 10:20:25 +02:00
Rafał Muszyński
3176f8bb98 [Translator][FrameworkBundle] Added @ to the list of allowed chars in Translator 2014-07-17 12:20:11 +02:00
Fabien Potencier
91e32f810b bug #11381 [2.3] [Process] Use correct test for empty string in UnixPipes (whs, romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] [Process] Use correct test for empty string in UnixPipes

| 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

This PR supersedes #11264 : 2.3 compatibility + Windows compatibility + CS fix

Commits
-------

cec0a45 [Process] Adjust PR #11264, make it Windows compatible and fix CS
9e1ea4a [Process] Use correct test for empty string in UnixPipes
2014-07-16 15:02:06 +02:00
Romain Neutron
cec0a45ff5 [Process] Adjust PR #11264, make it Windows compatible and fix CS 2014-07-16 14:40:06 +02:00
Romain Neutron
d4189350c0 [Process] Fix unit tests on Windows platform 2014-07-16 11:55:07 +02:00
Romain Neutron
ff0bb01a91 [Process] Reduce I/O load on Windows platform 2014-07-16 11:39:41 +02:00
Fabien Potencier
ace5a29867 bumped Symfony version to 2.3.19 2014-07-15 21:58:41 +02:00
Fabien Potencier
75e07e6bde updated VERSION for 2.3.18 2014-07-15 16:20:44 +02:00
Jérémy Derussé
06a80fbdbe Validate locales sets intos translator 2014-07-15 15:44:49 +02:00
Fabien Potencier
06fc97ead8 feature #11367 [HttpFoundation] Fix to prevent magic bytes injection in JSONP responses... (CVE-2014-4671) (Andrew Moore)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Fix to prevent magic bytes injection in JSONP responses... (CVE-2014-4671)

| 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
| CVE Ticket   | [CVE-2014-4671](http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-4671)
| See Also | [Rosetta Flash](http://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/)

\* Unless you are parsing the response string manually, which you really shouldn't do anyway

**THIS IS A SECURITY FIX AND SHOULD BE MERGED SHORTLY**

This fix prevents attacks vectors where third-party browser plugins depends on ASCII magic bytes in order to execute a plugin. This is currently exploited with Flash using a carefully crafted JSONP response, allowing the execution of random SWF data from a domain with a vulnerable JSONP endpoint.

This security issue is mitigated by adding an empty comment right before the callback parameter. This does not affect the execution of the JSONP callback.

Commits
-------

6af3d05 [HttpFoundation] Fix to prevent magic bytes injection in JSONP responses (Prevents CVE-2014-4671)
2014-07-15 15:35:51 +02:00
Fabien Potencier
3c54659baf minor #11387 [2.3] [Validator] Fix UserPassword validator translation (redstar504)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] [Validator] Fix UserPassword validator translation

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

Fixes the UserPassword translation message only for 2.3 as discussed in symfony/symfony#11383.

Commits
-------

73d50ed Fix UserPassword validator translation
2014-07-15 10:15:42 +02:00
redstar504
73d50edc17 Fix UserPassword validator translation 2014-07-13 22:59:18 -07:00
Christopher Davis
8f9ed3ebb9 Remove Spaceless Blocks from Twig Form Templates
In favor of using Twig's whitespace control operators. See #11277
2014-07-13 13:09:52 -04:00
Manatsawin Hanmongkolchai
9e1ea4aa4b [Process] Use correct test for empty string in UnixPipes 2014-07-12 16:25:05 +02:00
Fabien Potencier
ea45769aab fixed typo 2014-07-11 11:32:34 +02:00
Andrew Moore
6af3d05b85 [HttpFoundation] Fix to prevent magic bytes injection in JSONP responses (Prevents CVE-2014-4671) 2014-07-10 09:27:11 -04:00
Christophe Coevoet
ca69dbba43 minor #11362 [2.3][HttpFoundation] Fix wrong assertion in Response test (stloyd)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][HttpFoundation] Fix wrong assertion in Response test

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

Commits
-------

3d63f80 [HttpFoundation] Fix wrong assertion in Response test
2014-07-10 11:13:00 +02:00
Luis Cordova
9aa88e4494 added regression test 2014-07-10 10:55:37 +02:00
Matthew Davis
4201d419a2 fix issue #8171 on configuration tree for twig extension -- pairing up with @cordoval 2014-07-10 10:55:33 +02:00
Joseph Bielawski
3d63f801ff [HttpFoundation] Fix wrong assertion in Response test 2014-07-10 09:54:15 +02:00
Joseph Bielawski
a67bc7612e [2.3][Form] Cleanup & fix phpdocs 2014-07-09 12:39:32 +02:00
Fabien Potencier
5955f8edfe fixed CS 2014-07-09 11:04:31 +02:00
Simon Schick
9dbe89dba6 [HttpFoundation] Remove content-related headers if content is empty 2014-07-09 11:03:31 +02:00
Fabien Potencier
cc84d95787 minor #11344 remove defaults from PHPUnit configuration (craue)
This PR was merged into the 2.3 branch.

Discussion
----------

remove defaults from PHPUnit configuration

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

Follow-up to #11329.

Commits
-------

afc4930 removed defaults from PHPUnit configuration
2014-07-08 21:12:37 +02:00
Fabien Potencier
bf72e871f6 bumped Symfony version to 2.3.18 2014-07-08 13:19:32 +02:00
Romain Neutron
ebf967de8f [Form] Check if IntlDateFormatter constructor returned a valid object before using it 2014-07-07 23:17:57 +02:00
Fabien Potencier
c02f56f794 updated VERSION for 2.3.17 2014-07-07 14:59:36 +02:00
Christian Raue
afc4930900 removed defaults from PHPUnit configuration 2014-07-07 12:13:42 +02:00
Christian Raue
84b5581521 added XSD to PHPUnit configuration 2014-07-07 11:57:21 +02:00
Christian Lopez Espinola
eb63270bab bug #11319 [HttpKernel] Ensure the storage exists before purging it in ProfilerTest 2014-07-05 21:11:49 +02:00
Dmitriy Simushev
816a4a9ff1 [Translation] Added unescaping of ids in PoFileLoader 2014-07-04 08:08:13 +02:00
Michele Orselli
b74afe0700 updated italian translation for validation messages 2014-07-04 08:05:32 +02:00
Jakub Zalas
5cbe13e371 [DomCrawler] Fix docblocks and formatting. 2014-07-03 23:56:58 +01:00
Christophe Coevoet
38be14dd14 bug #11194 [DomCrawler] Remove the query string and the anchor of the uri of a link (benja-M-1)
This PR was squashed before being merged into the 2.3 branch (closes #11194).

Discussion
----------

[DomCrawler] Remove the query string and the anchor of the uri of a link

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

Commits
-------

fe5d2d1 [DomCrawler] Remove the query string and the anchor of the uri of a link
2014-07-04 00:18:40 +02:00
Benjamin Grandfond
fe5d2d1554 [DomCrawler] Remove the query string and the anchor of the uri of a link 2014-07-04 00:18:31 +02:00
akimsko
64328d967d [Console] Make sure formatter is the same
The parent constructor will create a new formatter if the $formatter parameter is null
This fix avoids that the formatter becomes 2 different instances in $this and $this->stderr
2014-07-02 15:19:50 +02:00
Curtis
de2bef5886 Fixed failed config schema loads due to libxml_disable_entity_loader
usage.

Applied CS patch.
2014-07-01 08:37:02 +02:00
Fabien Potencier
8a68e6c77e bug #11234 [ClassLoader] fixed PHP warning on PHP 5.3 (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[ClassLoader] fixed PHP warning on PHP 5.3

| 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
-------

7b2e3d9 [ClassLoader] fixed PHP warning on PHP 5.3
2014-06-29 11:45:08 +02:00
Romain Neutron
cd7fe02e9b bug #11179 [Process] Fix ExecutableFinder with open basedir (cs278)
This PR was squashed before being merged into the 2.3 branch (closes #11179).

Discussion
----------

[Process] Fix ExecutableFinder with open basedir

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

This fixes the `ExecutableFinder` object to properly fetch the `open_basedir` setting, also added a bunch of tests for the `find()` method.

Commits
-------

b8f8c0e [Process] Fix ExecutableFinder with open basedir
2014-06-28 11:33:33 +02:00
Chris Smith
b8f8c0ec4d [Process] Fix ExecutableFinder with open basedir 2014-06-28 11:33:24 +02:00
Fabien Potencier
fa2d337b99 bug #11242 [CssSelector] Refactored the CssSelector to remove the circular object graph (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

[CssSelector] Refactored the CssSelector to remove the circular object graph

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

This allows the translator and its extensions to be garbage collected based on the refcount rather than requiring the garbage collector run, making it much more likely to happen at the end of the ``CssSelector::toXPath`` call.

Node translators now receive the Translator as second argument, instead of requiring to inject it in the extension to keep a reference to it. This way, the Translator is referenced nowhere inside it, only by the caller, and so will be destructed at the end of the usage (and extensions will then be destructed after it when not used anymore).

Commits
-------

994f81f Refactored the CssSelector to remove the circular object graph
2014-06-27 13:00:13 +02:00
Christophe Coevoet
994f81fd86 Refactored the CssSelector to remove the circular object graph
This allows the translator and its extensions to be garbage collected
based on the refcount rather than requiring the garbage collector run,
making it much more likely to happen at the end of the
CssSelector::toXPath call.
2014-06-27 09:58:31 +02:00
Fabien Potencier
1045adfd56 bug #11219 [DomCrawler] properly handle buttons with single and double quotes insid... (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[DomCrawler] properly handle buttons with single and double quotes insid...

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

Commits
-------

cbbdbe4 [DomCrawler] properly handle buttons with single and double quotes inside the name attribute
2014-06-27 08:55:46 +02:00
Julien Pauli
1c5c694196 Fix mocks to support >=5.5.14 and >=5.4.30 2014-06-27 08:53:23 +02:00
Fabien Potencier
7b2e3d91d8 [ClassLoader] fixed PHP warning on PHP 5.3 2014-06-26 10:33:01 +02:00
Christian Flothmann
5bb2345790 [Components][Serializer] optional constructor arguments can be omitted during the denormalization process 2014-06-24 23:45:04 +02:00
Christian Flothmann
cbbdbe4c15 [DomCrawler] properly handle buttons with single and double quotes inside the name attribute 2014-06-24 23:09:12 +02:00
Fabien Potencier
eeeae94196 minor #11187 [Tests] don't disable constructor calls to mockups of classes that extend intern... (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Tests] don't disable constructor calls to mockups of classes that extend intern...

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

Fixes the tests for the 2.3 branch as reported by @stof in #11176.

Commits
-------

2c726b8 don't disable constructor calls to mockups of classes that extend internal PHP classes
2014-06-20 19:32:59 +02:00
Jannik Zschiesche
5af2802661 Added missing break statement
Added missing `break` statement in `AbstractFindAdapter` - a fall through doesn't seem to be intended here.
2014-06-20 18:06:33 +02:00
Christian Flothmann
2c726b8988 don't disable constructor calls to mockups of classes that extend internal PHP classes 2014-06-20 17:17:50 +02:00
Jannik Zschiesche
31b1dff875 Small comment update according to PSR-2
See [PSR-2](http://www.php-fig.org/psr/psr-2/) paragraph 5.2

> There MUST be a comment such as `// no break` when fall-through is intentional in a non-empty case body.

Related to #11181
2014-06-20 16:22:59 +02:00
Tim Nagel
cbcf513e36 Disallow abstract definitions from doctrine event listener registration 2014-06-19 18:30:28 +10:00
florianv
ff6c65ecf7 [Console] Fixed notice in DialogHelper 2014-06-19 01:02:32 +02:00
Fabien Potencier
fbf92e58cb bug #11144 [HttpFoundation] Fixed Request::getPort returns incorrect value under IPv6 (kicken)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Fixed Request::getPort returns incorrect value under IPv6

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

Commits
-------

2a0e8e3 [HttpFoundation] Fixed Request::getPort returns incorrect value under IPv6
2014-06-18 07:53:47 +02:00
Fabien Potencier
bd11e9216e minor #11136 [Filesystem] Fix test suite on OSX (romainneutron)
This PR was merged into the 2.3 branch.

Discussion
----------

[Filesystem] Fix test suite on OSX

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

Reviewing PR's, I realized the filesystem test suite fails on my setup (OSX, PHP 5.5.13 with posix ext). `posix_getgrgid` returns false, so some tests are failing.
This solves this issue.

Be aware that the patched method has been moved in FilesystemTestCase in recent branches

Commits
-------

e26f08e [Filesystem] Fix test suite on OSX
2014-06-17 21:57:48 +02:00
Keith Maika
2a0e8e39b8 [HttpFoundation] Fixed Request::getPort returns incorrect value under IPv6
Fixed issue with Request::getPort method returning an incorrect value when the HTTP_HOST header is a IPv6 address.
2014-06-17 10:14:17 -04:00
Romain Neutron
e26f08e9b5 [Filesystem] Fix test suite on OSX 2014-06-17 03:04:39 +02:00
Clemens Tolboom
a12471d171 Add framework-bundle 2014-06-16 12:23:01 +02:00
Fabien Potencier
92d93cea80 bug #10966 PHP Fatal error when getContainer method of ContainerAwareCommand has be... (kevinvergauwen)
This PR was squashed before being merged into the 2.3 branch (closes #10966).

Discussion
----------

PHP Fatal error when getContainer method of ContainerAwareCommand has be...

PHP Fatal error when getContainer method of ContainerAwareCommand has been called within the configure method of a Command (application property is not been set yet at that time)

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

Commits
-------

8ea5c4c PHP Fatal error when getContainer method of ContainerAwareCommand has be...
2014-06-16 10:10:36 +02:00
Kevin Vergauwen
8ea5c4c0f6 PHP Fatal error when getContainer method of ContainerAwareCommand has be... 2014-06-16 10:10:33 +02:00
Jannik Zschiesche
7bc37bd899 [HttpFoundation] Fixed isSecure() check to be compliant with the docs 2014-06-16 09:30:49 +02:00
kevinklika
c986b912a9 Update MimeTypeExtensionGuesser.php
Add ```'text/rtf' => 'rtf'``` type, as it is a valid type specification for rtf documents.
2014-06-16 08:02:36 +02:00
Seb Koelen
9247ef5e27 fix test src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php 2014-06-15 10:49:34 +02:00
Hans N. Hjort
bf21d1a0f1 Minor doc fix. 2014-06-12 11:58:07 +02:00
Fabien Potencier
cf28fd40b5 bug #11092 [HttpFoundation] Fix basic authentication in url with PHP-FPM (Kdecherf)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Fix basic authentication in url with PHP-FPM

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

`getUser()` and `getPassword()` from `Request` are broken when using PHP-FPM because of the lack of `$_SERVER['PHP_AUTH_USER']` and `$_SERVER['PHP_AUTH_PW']`. This PR fixes the issue.

However, now an empty password will return an empty string (which is the expected behavior of `ServerBag`) instead of `NULL`. The test is updated accordingly, but should we consider this as a breakage?

This issue was spotted by using basic auth via the Illuminate component of Laravel and is present from v2.1.0 to master.

Commits
-------

7a75adf [HttpFoundation] Basic auth in url is broken when using PHP CGI/FPM
2014-06-12 10:56:53 +02:00
Romain Neutron
c7d6bbbacc [Process] Minor README update 2014-06-11 09:56:44 +02:00
Kevin Decherf
7a75adf6f1 [HttpFoundation] Basic auth in url is broken when using PHP CGI/FPM
Request#getUser() and Request#getPassword() introduced in
aecfd0a891 do not handle the lack of
PHP_AUTH_USER and PHP_AUTH_PW in $this->server when using PHP-FPM. Use
$this->headers instead.
Furthermore, the test of empty password now expects an empty string
instead of NULL according to a450d002f2.
2014-06-10 23:31:45 +02:00
Martin Hasoň
e3bf86f31c Fixed a html error "Element ul is not closed" in logger.html.twig 2014-06-09 21:13:04 +02:00
Fabien Potencier
3e62ad8e53 [HttpFoundation] Officialize the 308 redirect RFC 2014-06-07 17:46:10 +02:00
Michal Dabrowski
876d6caacb issue #10808 crawler test 2014-06-06 07:27:49 +02:00
Darius
15f081d80a Empty select with attribute name="foo[]" bug fix
If you have a select with attribute name="foo[]", and you submit your form, http_build_query returns empty string as a result. In this case you get a form extra field validation error, because your field "foo" converts to
'' => bool(false)
2014-06-06 07:26:43 +02:00
Alaattin Kahramanlar
96518b4a0b Fixed contextually wrong translation 2014-06-06 06:58:08 +02:00
Eric GELOEN
14a4e4de27 [Bridge][Twig] Replace deprecated features 2014-06-06 05:23:41 +02:00
Tobias Schultze
da24bc9d13 [HttpFoundation] fix switch statement 2014-06-05 14:50:34 +02:00
Fabien Potencier
fe01d10735 bug #11009 [HttpFoundation] smaller fixes for PdoSessionHandler (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] smaller fixes for PdoSessionHandler

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

For both the PdoSessionHandler and DbalSessionHandler
- https://github.com/symfony/symfony/pull/10652#issuecomment-42370425: Transactional DELETE + INSERT does not work as expected
- https://github.com/symfony/symfony/pull/10652#issuecomment-44359784: sqlsrv 2005 does not support the MERGE SQL, and if used it requires an HOLDLOCK
- missing time update for sqlsrv and oracle

Commits
-------

a0e1d4d [Doctrine Bridge] fix DBAL session handler according to PdoSessionHandler
00d707f [HttpFoundation] use different approach for duplicate keys in postgres, fix merge for sqlsrv and oracle
2014-06-04 19:27:41 +02:00
Tobias Schultze
a0e1d4d5d7 [Doctrine Bridge] fix DBAL session handler according to PdoSessionHandler 2014-06-04 11:55:45 +02:00
Fabien Potencier
ceb4e0e369 fixed previous merge 2014-06-03 22:40:26 +02:00
Tony Cosentino
58b0aefa16 Added phpdoc for Cache-Control directives methods 2014-06-03 22:39:50 +02:00
Volker
637c6e1c69 Remove undefined variable $e 2014-06-03 03:40:41 +02:00
Fabien Potencier
38bdcf141c minor #11026 [Validator] Fix a parameter name in a test (elnur)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Fix a parameter name in a test

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

Commits
-------

069e925 Fix a parameter name in a test
2014-06-02 16:55:16 +02:00
Fabien Potencier
1793292ae9 bumped Symfony version to 2.3.17 2014-06-01 17:15:00 +02:00