Commit Graph

13926 Commits

Author SHA1 Message Date
Fabien Potencier
499c9e6fdc merged branch fabpot/cookie (PR #7738)
This PR was merged into the 2.1 branch.

Discussion
----------

[BrowserKit] fixed detection of secure cookies received over https

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

As reported in symfony/symfony#7666, BrowserKit's cookie handling only recognises a secure cookie if the cookie option is set and the cookie was set over an https request. The client was not passing the url into the cookiejar update code, causing Cookie::isSecure() to always return false for every cookie.

I have corrected this behaviour and added an additional unit test to prove the bug and fix.

Commits
-------

36d057b [HttpFoundation][BrowserKit] fixed path when converting a cookie to a string
c884151 [BrowserKit] removed dead code
495d0e3 [HttpFoundation] fixed empty domain= in Cookie::__toString()
c2bc707 fixed detection of secure cookies received over https
2013-04-20 20:17:49 +02:00
Fabien Potencier
36d057b69e [HttpFoundation][BrowserKit] fixed path when converting a cookie to a string
An empty path has a different meaning than a /; it means that the path
is the one from the current URI.
2013-04-20 20:05:01 +02:00
Fabien Potencier
c884151e16 [BrowserKit] removed dead code 2013-04-20 20:04:45 +02:00
Fabien Potencier
495d0e366e [HttpFoundation] fixed empty domain= in Cookie::__toString() 2013-04-20 19:50:53 +02:00
Andrew Coulton
c2bc707a4d fixed detection of secure cookies received over https
BrowserKit's cookie handling only recognises a secure cookie if the
cookie option is set and the cookie was set over an https request.
The client was not passing the url into the cookiejar update code,
causing Cookie::isSecure() to always return false for every cookie.

Fixes symfony/symfony#7666
2013-04-20 18:48:52 +02:00
Fabien Potencier
6290220f0a merged branch romainneutron/process-builder-prefix (PR #7584)
This PR was merged into the master branch.

Discussion
----------

[Process] Add ProcessBuilder::setPrefix method

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

This introduce a new feature for the `ProcessBuilder` that allows to prefix all generated `Process` commands with a custom value.
This is mostly useful when dealing with binary drivers.

Use case :

```php
use Symfony\Component\Process\ExecutableFinder;
use Symfony\Component\Process\ProcessBuilder;

class PhpDriver
{
    private $pb;

    public function __construct(ProcessBuilder $pb)
    {
        $this->pb = $pb;
    }

    public function getInfos()
    {
        return $this->execute('-i');
    }

    public function getVersion()
    {
        return $this->execute('-v');
    }

    private function execute(array $arguments)
    {
        return $this
            ->pb
            ->setArguments($arguments)
            ->createProcess()
            ->run()
            ->getOutput();
    }
}

$finder = new ExecutableFinder();

$pb = new ProcessBuilder();
$pb->setPrefix($finder->find('php'));

$driver = new PhpDriver($pb);
$driver->getVersion();
$driver->getInfos();
```

Commits
-------

cab53ee Add ProcessBuilder::setPrefix method
2013-04-20 18:25:02 +02:00
Fabien Potencier
5c53e6ba64 merged branch fabpot/trusted-proxies (PR #7735)
This PR was merged into the master branch.

Discussion
----------

[HttpFoundation][FrameworkBundle] Add CIDR notation support in trusted proxy list

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7312, #7262
| License       | MIT
| Doc PR        | symfony/symfony-docs#2287

Should be rebased once #7734 is merged.

Commits
-------

7b32794 [HttpFoundation] updated CHANGELOG
e7c1696 [HttpFoundation] refactored code to avoid code duplication
1695067 [HttpFoundation] added some unit tests for ranges of trusted IP addresses
811434f Allow setting trusted_proxies using CIDR notation
ddc9e38 Modify Request::getClientIp() to use IpUtils::checkIp()
2013-04-20 17:53:03 +02:00
Fabien Potencier
7b32794b79 [HttpFoundation] updated CHANGELOG 2013-04-20 17:52:13 +02:00
Fabien Potencier
e7c1696278 [HttpFoundation] refactored code to avoid code duplication 2013-04-20 17:49:57 +02:00
Fabien Potencier
169506743b [HttpFoundation] added some unit tests for ranges of trusted IP addresses 2013-04-20 17:49:57 +02:00
Dmitrii Chekaliuk
811434f988 Allow setting trusted_proxies using CIDR notation 2013-04-20 17:49:56 +02:00
Dmitrii Chekaliuk
ddc9e3892f Modify Request::getClientIp() to use IpUtils::checkIp()
Adds the ability to use CIDR notation in the trusted proxy list
2013-04-20 17:49:56 +02:00
Fabien Potencier
79cadc437d merged branch fabpot/request (PR #7734)
This PR was merged into the master branch.

Discussion
----------

Refactored tests of Request::getTrustedProxies()

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

This PR reorganizes the tests for the request trusted proxies as they were unreadable. In the process, I've also removed obsolete stuff and changed the order returned by `Request::getClientIps()` (not a BC break as this method was added in 2.3 -- see #7612).

Commits
-------

75db8eb [HttpFoundation] changed the order of IP addresses returned by Request::getClientIps()
deccb76 [HttpFoundation] refactored trusted proxies tests to make them easier to understand and change
1af9e5e [Request] removed obsolete proxy setting in tests
168b8cb [HttpFoundation] removed obsolete request property
2013-04-20 17:48:56 +02:00
Fabien Potencier
a00d7dc223 merged branch bschussek/improve-naming (PR #7732)
This PR was merged into the master branch.

Discussion
----------

[Form] Renamed form processors to request handlers

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/2092

Commits
-------

ae7c378 [Form] Renamed form processors to request handlers
2013-04-20 17:48:04 +02:00
Bernhard Schussek
ae7c3781b5 [Form] Renamed form processors to request handlers 2013-04-20 17:36:19 +02:00
Fabien Potencier
92f9706311 merged branch bschussek/cleanup-intl (PR #7733)
This PR was merged into the master branch.

Discussion
----------

[Intl] Removed obsolete classes

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

Commits
-------

9551932 [Intl] Removed obsolete classes
2013-04-20 17:18:13 +02:00
Fabien Potencier
75db8eb8a7 [HttpFoundation] changed the order of IP addresses returned by Request::getClientIps() 2013-04-20 17:09:51 +02:00
Fabien Potencier
deccb7651d [HttpFoundation] refactored trusted proxies tests to make them easier to understand and change 2013-04-20 17:02:44 +02:00
Fabien Potencier
1af9e5e788 [Request] removed obsolete proxy setting in tests 2013-04-20 16:44:27 +02:00
Bernhard Schussek
9551932e3b [Intl] Removed obsolete classes 2013-04-20 16:41:53 +02:00
Fabien Potencier
168b8cb23e [HttpFoundation] removed obsolete request property 2013-04-20 16:38:46 +02:00
Fabien Potencier
ce7bcddba1 merged branch mweimerskirch/patch-13 (PR #7253)
This PR was squashed before being merged into the 2.2 branch (closes #7253).

Discussion
----------

[2.2] Pass ESI header to subrequests

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

Commits
-------

af819a7 [2.2] Pass ESI header to subrequests
2013-04-20 15:53:43 +02:00
Michel Weimerskirch
af819a7145 [2.2] Pass ESI header to subrequests 2013-04-20 15:53:42 +02:00
Fabien Potencier
51a3561ed4 [SecurityBundle] added a missing entry in the CHANGELOG 2013-04-20 15:51:07 +02:00
Fabien Potencier
1777d984b9 merged branch danfinnie/multiple_ip_matching (PR #7251)
This PR was squashed before being merged into the master branch (closes #7251).

Discussion
----------

[SecurityBundle] [HttpFoundation] Allow for multiple IP address in security access_control rules

Fixes #7249.

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

Commits
-------

650352d [SecurityBundle] [HttpFoundation] Allow for multiple IP address in security access_control rules
2013-04-20 15:48:17 +02:00
Dan Finnie
650352d1ca [SecurityBundle] [HttpFoundation] Allow for multiple IP address in security access_control rules 2013-04-20 15:48:16 +02:00
Fabien Potencier
ed200170e3 added missing information in the CHANGELOGS 2013-04-20 15:44:32 +02:00
Fabien Potencier
8482ad2e80 [Validator] fixed CS 2013-04-20 15:37:39 +02:00
Fabien Potencier
cf526ff846 merged branch thewholelifetolearn/master (PR #6718)
This PR was squashed before being merged into the master branch (closes #6718).

Discussion
----------

[Validator] Added ISBN validator

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
License of the code: MIT

For information about ISBN-10 and ISBN13: https://en.wikipedia.org/wiki/Isbn

This constraint permits to valid a ISBN-10 code, a ISBN-13 code or both on a value

Commits
-------

4582261 [Validator] Added ISBN validator
2013-04-20 15:32:05 +02:00
The Whole Life to Learn
4582261cdf [Validator] Added ISBN validator 2013-04-20 15:30:26 +02:00
Fabien Potencier
4f7e3d40a2 merged branch pvolok/fix_7421 (PR #7660)
This PR was merged into the master branch.

Discussion
----------

[DomCrawler] Allow schema-less url in the base tag

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

Commits
-------

6bf9c68 [DomCrawler] allowed schema-less url in the base tag
2013-04-20 15:28:23 +02:00
Fabien Potencier
44be949045 [Validator] fixed CS 2013-04-20 15:26:53 +02:00
Fabien Potencier
3a507e0d86 merged branch sprain/validator-iban (PR #6677)
This PR was merged into the master branch.

Discussion
----------

[Form] [Validator] Added IBAN validator

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
License of the code: MIT

Validation for International Bank Account Numbers
http://en.wikipedia.org/wiki/International_Bank_Account_Number

I don't know if the community likes new validators. I have been using this in many projects and would love to see it integrated directly with Symfony.

Commits
-------

c8906f4 [Validator] Added IBAN validator
2013-04-20 15:22:53 +02:00
Fabien Potencier
719c278f32 merged branch egeloen/f-container-params-debug (PR #6550)
This PR was merged into the master branch.

Discussion
----------

[FrameworkBundle] Allow to debug container parameters

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Fixes the following tickets: ~
Todo: -
License of the code: MIT
Documentation PR: ~

Hey!

This PR adds a new command which allows to debug container parameters. IMO, being able to list all available parameters is very useful. We can now know which parameters we can inject into our services.

Regards

Commits
-------

ceb401d Add parameters debug to the container:debug command
64388c1 [FrameworkBundle] Allow to debug container parameters
2013-04-20 15:10:52 +02:00
Fabien Potencier
1454af7235 merged branch bendavies/iis-rewrite-subrequests (PR #7606)
This PR was merged into the 2.1 branch.

Discussion
----------

[HttpFoundation] fixes creation of sub requests under IIS & Rewite Module

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

There are a few bugs to address.

1. `HTTP_X_ORIGINAL_URL` wasn't removed from the server parameters, so is picked back up [here](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/ServerBag.php#L33) upon recreation of a sub request.
2. When `X_ORIGINAL_URL` is passed in the headers by IIS, `IIS_WasUrlRewritten` and `UNENCODED_URL` can also be passed as server vars, so they must also be removed for sub request URI's to be resolved correctly.

Additionally, I have removed the OS check for windows, because it was only done for 2 out of 4 of the IIS specific checks, and it made the code untestable.

Also added tests for all scenarios as there were none.

Commits
-------

9fcd2f6 [HttpFoundation] fixed the creation of sub-requests under some circumstances for IIS
2013-04-20 14:53:27 +02:00
Pavel Volokitin
6bf9c6839c [DomCrawler] allowed schema-less url in the base tag 2013-04-20 18:52:51 +06:00
Fabien Potencier
8202d1dd17 [Process] fixed CS 2013-04-20 14:33:48 +02:00
Fabien Potencier
ab4372865b merged branch mcuadros/master (PR #7566)
This PR was merged into the master branch.

Discussion
----------

[Process] Added support for processes that need a TTY to run.

Added support for processes that need a TTY to run. This can be useful in scenarios where we need to open an editor and wait for the user (like "crontab -e" or "git commit"). The new methos "setTTY" can be used to control this.

Regards

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

Commits
-------

2d30fb3 [Process] Added support for processes that need a TTY to run.
2013-04-20 14:29:16 +02:00
Fabien Potencier
e5af87047c [HttpFoundation] fixed CS of previous merge 2013-04-20 14:21:31 +02:00
Fabien Potencier
b644232344 merged branch davefx/patch-1 (PR #7729)
This PR was merged into the master branch.

Discussion
----------

If cannot start session due to already-sent headers, show the file and line that have sent them

If session cannot be started because of already-sent headers, show the file and line from which the output has been started.

Commits
-------

00d2643 Showing file that has sent headers if cannot start session
2013-04-20 14:19:32 +02:00
Máximo Cuadros Ortiz
2d30fb3cd0 [Process] Added support for processes that need a TTY to run. 2013-04-20 13:25:40 +02:00
David Marín
00d2643540 Showing file that has sent headers if cannot start session
If session cannot be started because of already-sent headers, show the file and line from which the output has been started.
2013-04-20 12:51:05 +03:00
Fabien Potencier
5762b5e1d2 merged branch sescandell/parent_file_loading (PR #7399)
This PR was squashed before being merged into the master branch (closes #7399).

Discussion
----------

[Config] Add possibility to get "parent bundle resource file" in import file loading process

FileLoader doesn't throw FileLoaderImportCircularReferenceException anymore if another file matchs import request.

Currently if a Bundle is defined as child of another Bundle and if we try to import a Resource from parent Bundle into the same "overrided" Resource, we get a FileLoaderImportCircularReferenceException.

Now, FileLoader locates "available files" and try to import one of them (rule is "the first that is not currently loading").

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

Commits
-------

b20386e [Config] Add possibility to get "parent bundle resource file" in import file loading process
2013-04-20 10:30:30 +02:00
Stéphane Escandell
b20386e61e [Config] Add possibility to get "parent bundle resource file" in import file loading process 2013-04-20 10:30:29 +02:00
Fabien Potencier
4c4a0c4ef1 [Translation] removed an uneeded class property 2013-04-20 10:25:59 +02:00
Fabien Potencier
ad4624cd04 [Translation] removed unneeded getter/setter 2013-04-20 09:44:39 +02:00
Fabien Potencier
8792575795 merged branch benjaminpaap/bugfixes/xliff_encoding (PR #7698)
This PR was squashed before being merged into the 2.1 branch (closes #7698).

Discussion
----------

[Translator] added additional conversion for encodings other than utf-8

Added an additional conversion if there is another encoding in the
xlf file present. Values from simple_xml are always utf-8 encoded.
Also added some tests to verify this new behaviour.

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

Commits
-------

54bcf5c [Translator] added additional conversion for encodings other than utf-8
2013-04-20 09:34:01 +02:00
Benjamin Paap
54bcf5c697 [Translator] added additional conversion for encodings other than utf-8 2013-04-20 09:34:00 +02:00
Fabien Potencier
9a24932ec3 merged branch xabbuh/issue7702 (PR #7728)
This PR was merged into the master branch.

Discussion
----------

[HttpKernel] added Debug component as testing dependency

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

Commits
-------

6ab17e2 added Debug component as testing dependency
2013-04-20 08:55:57 +02:00
Fabien Potencier
d3efdb0853 merged branch Olden/issue_6544 (PR #7706)
This PR was merged into the master branch.

Discussion
----------

[Form] Make exception handling consistent with other components

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

Commits
-------

bf9382e [Form] Make exception handling consistent with other components
2013-04-20 08:53:37 +02:00