Commit Graph

27220 Commits

Author SHA1 Message Date
Nicolas Grekas
8f18c3bd13 minor #19674 [HttpKernel] Fix too strict test (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Fix too strict test

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Tests pass?   | yes
| License       | MIT

This test is too strict and prevents adding properties to Data objects for no reason.

Commits
-------

2e7301d [HttpKernel] Fix too strict test
2016-08-19 15:45:43 +02:00
Nicolas Grekas
2e7301dabf [HttpKernel] Fix too strict test 2016-08-19 15:31:18 +02:00
Jacek Jędrzejewski
37ead22f95 fixed 3.2 UPGRADE notes for Yaml 2016-08-19 11:38:24 +02:00
Nicolas Grekas
72dfda914d Merge branch '3.1'
* 3.1:
  Disable CLI color for Windows 10 greater than 10.0.10586
  Exception details break the layout
  [HttpKernel] Remove wrong docblock
  [HttpKernel] Fix HttpCache validation HTTP method
  [FrameworkBundle] Fix default lifetime of cache pools
  Move space from the before 'if' to the after 'if'
  [TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes')
2016-08-19 08:48:55 +02:00
Nicolas Grekas
36b5716303 Merge branch '2.8' into 3.1
* 2.8:
  Disable CLI color for Windows 10 greater than 10.0.10586
  Exception details break the layout
  [HttpKernel] Remove wrong docblock
  [HttpKernel] Fix HttpCache validation HTTP method
  Move space from the before 'if' to the after 'if'
  [TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes')
2016-08-19 08:48:39 +02:00
Nicolas Grekas
93e8b1df5e Merge branch '2.7' into 2.8
* 2.7:
  Disable CLI color for Windows 10 greater than 10.0.10586
  Exception details break the layout
  [HttpKernel] Remove wrong docblock
  [HttpKernel] Fix HttpCache validation HTTP method
  Move space from the before 'if' to the after 'if'
  [TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes')
2016-08-19 08:48:01 +02:00
Nicolas Grekas
2909e4b04d bug #19660 Disable CLI color for Windows 10 greater than 10.0.10586 (mlocati)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #19660).

Discussion
----------

Disable CLI color for Windows 10 greater than 10.0.10586

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

The command prompt in Windows 10.0.10586 had enabled color support by default.
But in the next Windows versions they disabled it ([reference](https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/15617610--re-enable-enable-virtual-terminal-processing-by)): every exe now needs to explicitly turn on the color support.

I [already asked](https://bugs.php.net/bug.php?id=72768) the PHP dev team to enable it for php.exe, but they said they are busy for now.

So, let's turn off colors for Windows, until we'll have new PHP versions with color support enabled.

Commits
-------

255c59f Disable CLI color for Windows 10 greater than 10.0.10586
2016-08-19 08:41:18 +02:00
Michele Locati
255c59f670 Disable CLI color for Windows 10 greater than 10.0.10586 2016-08-19 08:41:18 +02:00
Nicolas Grekas
39cd984d7b bug #19663 Exception details break the layout (Dionysis Arvanitis)
This PR was merged into the 2.7 branch.

Discussion
----------

Exception details break the layout

Exception details break the layout

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| License       | MIT

By adding `word-wrap: break-word;` the exception details will wrap inside the block.

Commits
-------

00b4ecb Exception details break the layout
2016-08-18 22:08:23 +02:00
Dionysis Arvanitis
00b4ecb97a Exception details break the layout 2016-08-18 21:55:40 +03:00
Nicolas Grekas
f6408702b8 [FrameworkBundle][Debug] Fix default config and cleaning of traces 2016-08-18 18:41:56 +02:00
Fabien Potencier
58cdb047fa feature #19657 [VarDumper] Add line in trace indexes (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Add line in trace indexes

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Allows seeing the line number when the frames are collapsed, e.g.:
![capture du 2016-08-18 13-48-27](https://cloud.githubusercontent.com/assets/243674/17772691/872c6bd0-654a-11e6-9886-95fe57baca61.png)

Commits
-------

0b13016 [VarDumper] Add line in trace indexes
2016-08-18 08:49:40 -07:00
Nicolas Grekas
0b13016d2e [VarDumper] Add line in trace indexes 2016-08-18 17:46:51 +02:00
Fabien Potencier
12d0442582 removed obsolete code 2016-08-18 08:27:21 -07:00
Fabien Potencier
56cdaf96d6 minor #19659 [HttpKernel] Remove wrong docblock (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Remove wrong docblock

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Tests pass?   | yes
| License       | MIT

The doc block must come from a bad merge...
Meanwhile, let's group "count*" methods together.

Commits
-------

1972a8f [HttpKernel] Remove wrong docblock
2016-08-18 07:25:28 -07:00
Nicolas Grekas
1972a8f906 [HttpKernel] Remove wrong docblock 2016-08-18 14:31:26 +02:00
Fabien Potencier
885c388917 feature #19639 [Routing] Generate URLs in compliance with PHP_QUERY_RFC3986 (jameshalsall)
This PR was submitted for the 2.7 branch but it was merged into the 3.2-dev branch instead (closes #19639).

Discussion
----------

[Routing] Generate URLs in compliance with PHP_QUERY_RFC3986

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

Commits
-------

ce724e2 [Routing] Generate URLs in compliance with PHP_QUERY_RFC3986
2016-08-17 18:15:16 -07:00
James Halsall
ce724e26b5 [Routing] Generate URLs in compliance with PHP_QUERY_RFC3986 2016-08-17 18:15:09 -07:00
Fabien Potencier
c5ca5f3ed7 bug #19651 [HttpKernel] Fix HttpCache validation HTTP method (tgalopin)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Fix HttpCache validation HTTP method

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

Commits
-------

1a8a8af [HttpKernel] Fix HttpCache validation HTTP method
2016-08-17 11:31:09 -07:00
Titouan Galopin
1a8a8afdc6 [HttpKernel] Fix HttpCache validation HTTP method 2016-08-17 20:25:22 +02:00
Fabien Potencier
f12d2b75f3 minor #19574 [TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes') (Evgeniy Tetenchuk, johnatannvmd)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes')

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

Remove unnecessary block calling for choices without "choice_attr" option. This check gain the performance on a large datasets.

Previous Pull to master #19527

Commits
-------

bf6748d Move space from the before 'if' to the after 'if'
d1cf4d1 [TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes')
2016-08-17 10:53:54 -07:00
Fabien Potencier
a7bd13559f bug #19650 [FrameworkBundle] Fix default lifetime of cache pools (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[FrameworkBundle] Fix default lifetime of cache pools

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

Commits
-------

ec603d3 [FrameworkBundle] Fix default lifetime of cache pools
2016-08-17 10:52:43 -07:00
Nicolas Grekas
f2200f7cad feature #19568 [Debug] Better error handling (lyrixx)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Debug] Better error handling

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

1. Send the raw exception in the log context instead of custom formatting
2. Add config option to log/throw in Symfony all PHP errors
3. Always use an exception when a PHP error occurs
4. Expand exception in the log context in the web developer toolbar
5. Use the dumper to dump log context in the web developer toolbar

---

I used the following code to produce screenshots:

```php
public function indexAction(Request $request)
    {
        $this->get('logger')->info('A log message with an exception', ['exception' => new \Exception('this exception will be logged')]);

        error_reporting(0);
        for ($i=0; $i < 15; $i++) {
            if ($i == 5) {
                error_reporting(E_ALL);
            }
            if ($i == 10) {
                error_reporting(0);
            }

            trigger_error("Trigger error avec E_USER_NOTICE", E_USER_NOTICE);
        }

        error_reporting(E_ALL);

        @trigger_error("trigger_error avec E_USER_DEPRECATED", E_USER_DEPRECATED);
        trigger_error("trigger_error avec E_USER_DEPRECATED (not silent)", E_USER_DEPRECATED);
// ...
```

![screenshot16](https://cloud.githubusercontent.com/assets/408368/17582279/2c4239b0-5fab-11e6-8428-2eaa7372cce3.png)

![screenshot17](https://cloud.githubusercontent.com/assets/408368/17582287/30cad1ea-5fab-11e6-9b0b-de0fa9f3913b.png)

![screenshot18](https://cloud.githubusercontent.com/assets/408368/17582291/348bb574-5fab-11e6-83b0-5bfaac080838.png)

Commits
-------

8f24549 [Debug] Better error handling
2016-08-17 17:35:28 +02:00
Grégoire Pineau
8f245493f4 [Debug] Better error handling
1. Send the raw exception in the log context instead of custom formatting
2. Add config option to log in Symfony all PHP errors
2016-08-17 17:20:26 +02:00
Grégoire Pineau
d80589c2d4 [Debug] Swap dumper services at bootstrap
This commit fix a bug when using debug function too soon.
For example, if you call dump function during kernel::boot() the
dump output will be sent to stderr, even in a web context.

With this patch, the data collector is used by default, so the
dump output is send to the WDT. In a CLI context, if dump is used
too soon, the datacollector will buffer it, and release it at the
end of the script. So in this case everything will be visible by the
end used.
2016-08-17 13:57:44 +02:00
Nicolas Grekas
ec603d3c7f [FrameworkBundle] Fix default lifetime of cache pools 2016-08-17 13:39:34 +02:00
Fabien Potencier
cf307507ee minor #19624 [Bridge/Twig] Simplify dumping snippet (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Bridge/Twig] Simplify dumping snippet

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | needs #19623
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

ef7122e [Bridge/Twig] Simplify dumping snippet
2016-08-16 10:16:30 -07:00
Fabien Potencier
3bf89b628e bug #19640 [Cache] Minor fixes after merging 3.1 (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Cache] Minor fixes after merging 3.1

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

Commits
-------

0f9e54a [Cache] Minor fixes after merging 3.1
2016-08-16 10:14:58 -07:00
Nicolas Grekas
82a0de212b [Cache] Add PDO + Doctrine DBAL adapter 2016-08-16 19:01:35 +02:00
Nicolas Grekas
0f9e54a590 [Cache] Minor fixes after merging 3.1 2016-08-16 18:59:36 +02:00
Nicolas Grekas
ef7122eb4f [Bridge/Twig] Simplify dumping snippet 2016-08-16 18:19:38 +02:00
Nicolas Grekas
77e0161870 Merge branch '3.1'
* 3.1:
  [Routing] Add missing options in docblock
  [VarDumper] Fix dumping continuations
  [PropertyInfo] Fix an error in PropertyInfoCacheExtractor
  [HttpFoundation] fixed Request::getContent() reusage bug
  [Form] Skip CSRF validation on form when POST max size is exceeded
  Use try-finally where it possible
  [DependencyInjection] ContainerBuilder: Remove obsolete definitions
  Enhance the phpDoc return types so IDEs can handle the configuration tree.
  fixes
  Remove 3.0 from branch suggestions for fixes in PR template
  [Process] Strengthen Windows pipe files opening (again...)
  [Cache] Handle unserialize() failures gracefully
  Fix #19531 [Form] DateType fails parsing when midnight is not a valid time
2016-08-16 18:09:30 +02:00
Fabien Potencier
5ace4fd24e feature #19552 [HttpFoundation] Add named constructor on JsonResponse (tyx)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[HttpFoundation] Add named constructor on JsonResponse

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

To make easier construction with raw json. It is a simple addition but having something like :
```php
return new JsonResponse($content, Response::HTTP_OK, [], true);
```

and
```php
return new JsonResponse($content, Response::HTTP_OK, []);
```

is not very obvious to get the difference without going to read the JsonResponse constructor.

Commits
-------

6d5a65d Add named constructor on JsonResponse
2016-08-16 08:48:13 -07:00
Evgeniy
bf6748dd52 Move space from the before 'if' to the after 'if' 2016-08-16 22:44:35 +07:00
Fabien Potencier
d7f8ca72e8 Merge branch '2.8' into 3.1
* 2.8:
  [Routing] Add missing options in docblock
  [VarDumper] Fix dumping continuations
  [HttpFoundation] fixed Request::getContent() reusage bug
  [Form] Skip CSRF validation on form when POST max size is exceeded
  Enhance the phpDoc return types so IDEs can handle the configuration tree.
  fixes
  Remove 3.0 from branch suggestions for fixes in PR template
  [Process] Strengthen Windows pipe files opening (again...)
  Fix #19531 [Form] DateType fails parsing when midnight is not a valid time
2016-08-16 07:58:24 -07:00
Fabien Potencier
609ee2df0a Merge branch '2.7' into 2.8
* 2.7:
  [Routing] Add missing options in docblock
  [VarDumper] Fix dumping continuations
  [HttpFoundation] fixed Request::getContent() reusage bug
  [Form] Skip CSRF validation on form when POST max size is exceeded
  Enhance the phpDoc return types so IDEs can handle the configuration tree.
  fixes
  Remove 3.0 from branch suggestions for fixes in PR template
  [Process] Strengthen Windows pipe files opening (again...)
  Fix #19531 [Form] DateType fails parsing when midnight is not a valid time
2016-08-16 07:56:08 -07:00
Fabien Potencier
adb7033fc2 bug #19623 [VarDumper] Fix dumping continuations (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix dumping continuations

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

Dumping twice on the same destination shouldn't dump headers again.

Commits
-------

da96719 [VarDumper] Fix dumping continuations
2016-08-16 07:52:15 -07:00
Fabien Potencier
f56ba630db feature #19630 [VarDumper] Enhance dumping __PHP_Incomplete_Class objects (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Enhance dumping __PHP_Incomplete_Class objects

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

Before:
```
__PHP_Incomplete_Class {
  +"__PHP_Incomplete_Class_Name": "Foo\Buzz"
}
```

after:
```
__PHP_Incomplete_Class(Foo\Buzz) {}
```

The new output is less confusing: no dynamic property exists on incomplete class objects, yet the `+` prefix suggests that.

Commits
-------

ee20d15 [VarDumper] Enhance dumping __PHP_Incomplete_Class objects
2016-08-16 07:48:30 -07:00
Fabien Potencier
e34426e105 minor #19617 Use try-finally where it possible (Koc)
This PR was merged into the 3.1 branch.

Discussion
----------

Use try-finally where it possible

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

Just a minior refactoring for using PHP 5.5 feature.

Commits
-------

747ddf6 Use try-finally where it possible
2016-08-16 07:44:38 -07:00
Fabien Potencier
d62ac4d809 minor #19628 [Routing] Add missing options in docblock (c960657)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Add missing options in docblock

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

Courtesy of @c960657 in #19562

Commits
-------

f45da32 [Routing] Add missing options in docblock
2016-08-16 07:32:36 -07:00
Nicolas Grekas
ee20d15b50 [VarDumper] Enhance dumping __PHP_Incomplete_Class objects 2016-08-16 14:42:25 +02:00
Christian Schmidt
f45da32488 [Routing] Add missing options in docblock 2016-08-16 12:55:04 +02:00
Nicolas Grekas
da96719b94 [VarDumper] Fix dumping continuations 2016-08-16 10:33:51 +02:00
Fabien Potencier
ac528c7cff bug #19437 [PropertyInfo] Fix an error in PropertyInfoCacheExtractor (Ener-Getick)
This PR was squashed before being merged into the 3.1 branch (closes #19437).

Discussion
----------

[PropertyInfo] Fix an error in PropertyInfoCacheExtractor

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

An argument was forgotten in the ``PropertyInfoCacheExtractor`` class leading to exceptions such as
```
PHP Warning:  ucfirst() expects parameter 1 to be string, array given in /home/guilhem/github/ast-test/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php on line 318
```
and making it unusable.

ping @dunglas

Commits
-------

d19b151 [PropertyInfo] Fix an error in PropertyInfoCacheExtractor
2016-08-15 16:12:25 -07:00
Guilhem N
d19b1515a3 [PropertyInfo] Fix an error in PropertyInfoCacheExtractor 2016-08-15 16:12:15 -07:00
Fabien Potencier
2345ec1210 bug #19549 [HttpFoundation] fixed Request::getContent() reusage bug (1ma)
This PR was squashed before being merged into the 2.7 branch (closes #19549).

Discussion
----------

[HttpFoundation] fixed Request::getContent() reusage bug

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

After calling ```Request::getContent(true)```, subsequent calls to the
same instance method (withouth the ```$asResource``` flag) always returned
```false``` instead of the request body as a plain string.

A unit test already existed to guard against this behaviour (the 'Resource then fetch' case) but it
yielded a false positive because it was comparing ```''``` to ```false``` using
PHPUnit's ```assertEquals``` method instead of ```assertSame```.

For completeness sake I also added the missing usage permutations in
the data provider, which already worked OK.

Commits
-------

c42ac66 [HttpFoundation] fixed Request::getContent() reusage bug
2016-08-15 16:08:50 -07:00
Marcel Hernandez
c42ac660cb [HttpFoundation] fixed Request::getContent() reusage bug 2016-08-15 16:08:46 -07:00
Fabien Potencier
9784301b1f minor #19608 [DependencyInjection] ContainerBuilder: Remove obsolete definitions (ogizanagi)
This PR was merged into the 3.1 branch.

Discussion
----------

[DependencyInjection] ContainerBuilder: Remove obsolete definitions

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

IIUC, [the obsolete definitions thing was tied to scoped & sync services](https://github.com/symfony/symfony/pull/7007).
Thus, this code [is not meant to be used since 3.0 and can be removed](https://github.com/symfony/symfony/pull/13289).

However, it may be considered as a BC break and would require introducing a new deprecation instead, because the current code allows to set a service on a frozen container if it has an obsolete synthetic definition...which is weird, isn't it ? (I doubt this feature was explicitly intended to allow setting a synthetic service more than once, and it wasn't before sync services introduction)

I suggest this as a patch for 3.1, under the pretext of forgotten code tied to a previous deprecation & feature removal, but let me know if it should be considered differently.

Commits
-------

daa7d00 [DependencyInjection] ContainerBuilder: Remove obsolete definitions
2016-08-15 16:00:31 -07:00
Fabien Potencier
1a059e54cf bug #19373 [Form] Skip CSRF validation on form when POST max size is exceeded (jameshalsall)
This PR was squashed before being merged into the 2.7 branch (closes #19373).

Discussion
----------

[Form] Skip CSRF validation on form when POST max size is exceeded

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

In #19140 the CSRF validation listener was not aware that the POST max size had exceeded, and was adding a form error message that wasn't relevant to the actual error.

This introduces the `ServerParams` utility class into the `CsrfValidationListener` and checks that the POST max size has not been exceeded. If it has then it won't bother trying to validate the CSRF token.

My main concern with this change is that it opens up an attack vector around tokens, but I've encapsulated the request size validation in a single method in `ServerParams` now so that the request handlers are using the same logic.

Commits
-------

289531f [Form] Skip CSRF validation on form when POST max size is exceeded
2016-08-15 15:45:28 -07:00
James Halsall
289531f0d0 [Form] Skip CSRF validation on form when POST max size is exceeded 2016-08-15 15:45:25 -07:00