Commit Graph

28909 Commits

Author SHA1 Message Date
Nicolas Grekas
ba41e706ad Merge branch '3.1' into 3.2
* 3.1:
  fix getMock usage
  [DependencyInjection] Fixed variadic method parameter in autowired classes
  update German translation
  [Validator] Improved error message for missing upload_tmp_dir
2017-01-23 09:25:37 +01:00
Nicolas Grekas
4268abacf4 Merge branch '2.8' into 3.1
* 2.8:
  update German translation
  [Validator] Improved error message for missing upload_tmp_dir
2017-01-23 09:25:24 +01:00
Nicolas Grekas
3faf655638 Merge branch '2.7' into 2.8
* 2.7:
  update German translation
  [Validator] Improved error message for missing upload_tmp_dir
2017-01-23 09:25:05 +01:00
Nicolas Grekas
e95fc09b3c fix getMock usage 2017-01-23 09:24:39 +01:00
Nicolas Grekas
482828ce29 fix merge 2017-01-23 09:24:07 +01:00
Fabien Potencier
ed5eb6db54 bug #21372 [DependencyInjection] Fixed variadic method parameter in autowired classes (brainexe)
This PR was squashed before being merged into the 3.1 branch (closes #21372).

Discussion
----------

[DependencyInjection] Fixed variadic method parameter in autowired classes

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

Autowiring classes containing methods with variadic method parameter throws a ReflectionException in compile process:

```
PHP Fatal error:  Uncaught ReflectionException: Internal error: Failed to retrieve the default value in /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php:437
Stack trace:
#0 /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php(437): ReflectionParameter->getDefaultValue()
#1 /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php(80): Symfony\Component\DependencyInjection\Compiler\AutowirePass::getResourceMetadataForMethod(Object(ReflectionMethod))
#2 /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php(105): Symfony\Component\DependencyInjection\Compiler\AutowirePass::createResourceForClass(Object(ReflectionClass))
#3 /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php(48): Symfony\Component\DependencyInjection\Compiler\AutowirePass->completeDefinition('__controller.Sw...', Object(Symfony\Component\DependencyInjection\Definition), Array)
#4 /.../vendor/symfony/dependency-injection/Compiler/Compiler in /.../vendor/symfony/dependency-injection/Compiler/AutowirePass.php on line 437
```

**Example:**
```
<?php
class FooVariadic
{
    public function bar(...$arguments)
    {
    }
}

$method = new ReflectionMethod(FooVariadic::class, 'bar');
$parameter = $method->getParameters()[0];
$parameter->getDefaultValue(); // -> ReflectionException: Internal error: Failed to retrieve the default value in ...
```

Commits
-------

a7f63de414 [DependencyInjection] Fixed variadic method parameter in autowired classes
2017-01-22 12:28:23 -08:00
matze
a7f63de414 [DependencyInjection] Fixed variadic method parameter in autowired classes 2017-01-22 12:28:21 -08:00
Fabien Potencier
9ef427150c minor #21371 [Validator] update German translation (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] update German translation

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

Commits
-------

f920e61d35 update German translation
2017-01-22 08:17:47 -08:00
Christian Flothmann
f920e61d35 update German translation 2017-01-22 08:38:04 +01:00
Fabien Potencier
41c72ab909 minor #21335 [Validator] Improved error message for missing upload_tmp_dir (Breuls)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Improved error message for missing upload_tmp_dir

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

I ran into a problem in which the value for upload_tmp_dir was set in php.ini, but PHP was unable to write to the specified location. PHP returns an UPLOAD_ERR_NO_TMP_DIR in $_FILES when it can't find or use the tmp dir, and my application displayed the error for $uploadNoTmpDirErrorMessage, from which I drew the conclusion that the ini setting was missing or emtpy.

This conclusion was based on the wording in the error message, which explicitly states that 'no temporary folder was configured', which is not actually correct. According to the [PHP documentation](http://php.net/manual/en/features.file-upload.errors.php):

> UPLOAD_ERR_NO_TMP_DIR
> Value: 6; Missing a temporary folder. Introduced in PHP 5.0.3.

'Missing' might be interpreted as 'the value for the ini setting is missing', but also as 'the configured folder is missing'.

I thought it might save someone some time if the error message from the Symfony Validator makes this explicit, which is what this PR aims to do.

I also updated the Dutch and Polish translations, because those, in addition to English, are the languages spoken in my team.

Commits
-------

afbf22746a [Validator] Improved error message for missing upload_tmp_dir
2017-01-21 10:14:52 -08:00
Fabien Potencier
2106e94f34 fixed CS 2017-01-21 09:18:54 -08:00
Fabien Potencier
16d8fa669a Merge branch '3.1' into 3.2
* 3.1:
  fixed CS
2017-01-21 09:14:11 -08:00
Fabien Potencier
e3dcde7b8a fixed CS 2017-01-21 09:13:55 -08:00
Fabien Potencier
ebdbd96449 Merge branch '3.1' into 3.2
* 3.1: (31 commits)
  fixed CS
  fixed CS
  fixed CS fixer config
  fixed typo
  Revert "fixed typo"
  fixed typo
  fixed CS
  Avoid setting request attributes from signature arguments in AnnotationClassLoader
  [DependencyInjection] Add some missing typehints in YamlFileLoader
  [DependencyInjection] minor: Fix a DocBlock
  [HttpKernel] Give higher priority to adding request formats
  [PropertyInfo] Don't try to access a property thru a static method
  [PropertyInfo] Exclude static methods form properties guessing
  [FrameworkBundle] Fix third level headers for MarkdownDescriptor
  [Ldap] Using Ldap stored username instead of form submitted one
  [Ldap] load users with the good username case
  [DoctrineBridge] Fixed invalid unique value as composite key
  [Doctrine Bridge] fix UniqueEntityValidator for composite object primary keys
  [TwigBundle] do not lose already set method calls
  #20411 fix Yaml parsing for very long quoted strings
  ...
2017-01-21 09:06:35 -08:00
Fabien Potencier
20bdaa6cc5 Merge branch '2.8' into 3.1
* 2.8: (26 commits)
  fixed CS
  fixed CS
  fixed CS fixer config
  fixed typo
  Revert "fixed typo"
  fixed typo
  fixed CS
  Avoid setting request attributes from signature arguments in AnnotationClassLoader
  [DependencyInjection] Add some missing typehints in YamlFileLoader
  [DependencyInjection] minor: Fix a DocBlock
  [HttpKernel] Give higher priority to adding request formats
  [PropertyInfo] Don't try to access a property thru a static method
  [PropertyInfo] Exclude static methods form properties guessing
  [FrameworkBundle] Fix third level headers for MarkdownDescriptor
  [TwigBundle] do not lose already set method calls
  #20411 fix Yaml parsing for very long quoted strings
  CS: apply is_null
  DX: remove invalid inheritdoc
  bumped Symfony version to 2.8.17
  updated VERSION for 2.8.16
  ...
2017-01-21 09:01:39 -08:00
Fabien Potencier
4a46c6ff13 fixed CS 2017-01-21 08:59:38 -08:00
Fabien Potencier
2d0634d941 Merge branch '2.7' into 2.8
* 2.7:
  fixed CS
  fixed CS fixer config
2017-01-21 08:53:15 -08:00
Fabien Potencier
b6507c8c1c fixed CS 2017-01-21 08:52:33 -08:00
Fabien Potencier
2ff6f445bc fixed CS fixer config 2017-01-21 08:45:58 -08:00
Fabien Potencier
a784d5c01f Merge branch '2.7' into 2.8
* 2.7:
  fixed typo
  Revert "fixed typo"
  fixed typo
  fixed CS
  Avoid setting request attributes from signature arguments in AnnotationClassLoader
  [DependencyInjection] Add some missing typehints in YamlFileLoader
  [DependencyInjection] minor: Fix a DocBlock
  [HttpKernel] Give higher priority to adding request formats
  [FrameworkBundle] Fix third level headers for MarkdownDescriptor
  [TwigBundle] do not lose already set method calls
  #20411 fix Yaml parsing for very long quoted strings
  CS: apply is_null
  DX: remove invalid inheritdoc
  bumped Symfony version to 2.7.24
  updated VERSION for 2.7.23
  update CONTRIBUTORS for 2.7.23
  updated CHANGELOG for 2.7.23
  [FrameworkBundle] Skip test if xdebug.file_link_format is defined.
2017-01-21 08:40:50 -08:00
Fabien Potencier
d103b61420 fixed typo 2017-01-21 08:37:56 -08:00
Fabien Potencier
735d0a6ce7 Revert "fixed typo"
This reverts commit 6830d9f4c9.
2017-01-21 08:37:26 -08:00
Fabien Potencier
2b317c1de1 minor #21363 CS fixes (fabpot)
This PR was squashed before being merged into the 2.7 branch (closes #21363).

Discussion
----------

CS fixes

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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
-------

6830d9f4c9 fixed typo
5176f978bf fixed CS
2017-01-21 08:34:55 -08:00
Fabien Potencier
6830d9f4c9 fixed typo 2017-01-21 08:33:48 -08:00
Peter Breuls
afbf22746a [Validator] Improved error message for missing upload_tmp_dir 2017-01-21 09:48:33 +01:00
Fabien Potencier
5176f978bf fixed CS 2017-01-20 08:54:19 -08:00
Fabien Potencier
922b7c1a54 bug #21338 [Cache] Fix tags expiration (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[Cache] Fix tags expiration

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

Commits
-------

c0022f29d6 [Cache] Fix tags expiration
2017-01-19 10:47:58 -08:00
Fabien Potencier
77289b9023 bug #21333 [HttpKernel] Fix ArgumentValueResolver for arguments default null (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Fix ArgumentValueResolver for arguments default null

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

If an argument has `null` as default value __and annotations are used for routing__, then it is not resolved by the ArgumentResolver e.g:

```php

public function showAction(Request $request) {
   dump($request); // Request object
}

public function showAction(?Request $request) {
   dump($request); // Request object
}

public function showAction(Request $request = null) {
   dump($request); // null
}
```
To me, the last example should have been a Request object too.

Note that it is the same behavior when using `UserInterface` or whatever, I ran into this issue while trying to dump a user for a route accepting both anonymous and authenticated requests, the argument was always null while `$this->getUser()` returned the expected value. According to http://symfony.com/blog/new-in-symfony-3-2-user-value-resolver-for-controllers it should have worked through the argument.

I propose to make it works as a bugfix.
Any suggestion for improving the patch will be really welcomed. ping @iltar

Commits
-------

d3fa8a1859 Avoid setting request attributes from signature arguments in AnnotationClassLoader
2017-01-19 09:09:26 -08:00
Robin Chalas
d3fa8a1859 Avoid setting request attributes from signature arguments in AnnotationClassLoader 2017-01-19 17:02:55 +01:00
Fabien Potencier
5ba84cab08 minor #21346 [DependencyInjection] Add some missing typehints in YamlFileLoader (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] Add some missing typehints in YamlFileLoader

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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
-------

34330e5136 [DependencyInjection] Add some missing typehints in YamlFileLoader
2017-01-19 07:37:36 -08:00
Fabien Potencier
6148457502 minor #21345 [DependencyInjection] minor: Fix a param type (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] minor: Fix a param type

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| 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
-------

c82aa84c26 [DependencyInjection] minor: Fix a DocBlock
2017-01-19 07:37:02 -08:00
Kévin Dunglas
34330e5136
[DependencyInjection] Add some missing typehints in YamlFileLoader 2017-01-19 14:51:14 +01:00
Kévin Dunglas
c82aa84c26
[DependencyInjection] minor: Fix a DocBlock 2017-01-19 14:34:44 +01:00
Fabien Potencier
419bcf6c58 bug #20871 [HttpKernel] Give higher priority to adding request formats (akeeman)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20871).

Discussion
----------

[HttpKernel] Give higher priority to adding request formats

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | yes (unlikely to break projects*)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | not documented

\* Only applies to the unlikely case where formats are used before this event is loaded key. Users must have specified custom formats, and actually using them should then break their application. I think that's an unlikely case.

## Problem
It's possible to extend the formats known by the `Request` using a piece of config:
```yaml
framework:
    request:
        formats:
            json: 'application/merge-patch+json'
```

Using this in a `kernel.request` event is currently not possible, as it loads after any custom events.

## Offered solution
Increasing the priority of the AddRequestFormatsListener listener resolves this problem.
This change only impacts projects that use the `framework.request.formats` configuration key, as the listener is not loaded if it isn't defined.

Commits
-------

9edb457e44 [HttpKernel] Give higher priority to adding request formats
2017-01-18 11:53:10 -08:00
Arjan Keeman
9edb457e44 [HttpKernel] Give higher priority to adding request formats 2017-01-18 11:53:09 -08:00
Fabien Potencier
bfdac85304 bug #21332 [PropertyInfo] Don't try to access a property thru a static method (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] Don't try to access a property thru a static method

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

See also #21331.

Commits
-------

3b4858fe88 [PropertyInfo] Don't try to access a property thru a static method
2017-01-18 11:21:25 -08:00
Fabien Potencier
6283fc41fd bug #21336 [PhpUnit] Blacklist DeprecationErrorHandler in stack traces (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[PhpUnit] Blacklist DeprecationErrorHandler in stack traces

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

So that phpunit doesn't tell about DeprecationErrorHandler in failure's stack traces.

Commits
-------

3f693aeb86 [PhpUnit] Blacklist DeprecationErrorHandler in stack traces
2017-01-18 08:05:17 -08:00
Nicolas Grekas
c0022f29d6 [Cache] Fix tags expiration 2017-01-18 16:46:19 +01:00
Fabien Potencier
0ca3e96d13 bug #21331 [PropertyInfo] Exclude static methods form properties guessing (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] Exclude static methods form properties guessing

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

Commits
-------

190c736d3c [PropertyInfo] Exclude static methods form properties guessing
2017-01-18 07:18:26 -08:00
Nicolas Grekas
3f693aeb86 [PhpUnit] Blacklist DeprecationErrorHandler in stack traces 2017-01-18 16:07:33 +01:00
Kévin Dunglas
3b4858fe88
[PropertyInfo] Don't try to access a property thru a static method 2017-01-18 13:18:58 +01:00
Kévin Dunglas
190c736d3c
[PropertyInfo] Exclude static methods form properties guessing 2017-01-18 13:05:57 +01:00
Fabien Potencier
24f0fd0dda bug #21280 [Workflow] Fixed support of multiple transitions with the same name. (lyrixx)
This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] Fixed support of multiple transitions with the same name.

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

---

The previous behavior was underterministic because it took the first
transition during the `can` and the `apply` method. But the "first"
does not mean anything. Now the workflown apply all possible transitions
with the same name.

Commits
-------

edd5431e6e [Workflow] Fixed support of multiple transition with the same name.
2017-01-17 21:35:58 -08:00
Fabien Potencier
30a01437d4 bug #21271 [Workflow] Added new validator to make sure each place has unique translation names (Nyholm)
This PR was submitted for the master branch but it was merged into the 3.2 branch instead (closes #21271).

Discussion
----------

[Workflow] Added new validator to make sure each place has unique translation names

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

A definition where a place that has transitions with the same name is an invalid definition.

```yaml
invalid1:
  places: ['a', 'b', 'c']
  transitions:
    t1:
      from: a
      to: b
    t1:
      from: a
      to: c

valid1:
  places: ['a', 'b', 'c']
  transitions:
    t1:
      from: a
      to: b
    t2:
      from: a
      to: c

valid2:
  places: ['a', 'b', 'c']
  transitions:
    t1:
      from: a
      to: b
    t1:
      from: b
      to: c

valid3:
  places: ['a', 'b', 'c', 'd']
  transitions:
    t1:
      from: ['a', 'b']
      to: d
    t2:
      from: ['a', 'b']
      to: c
```

FYI @lyrixx

Commits
-------

eece8adfdd [Workflow] Added new validator to make sure each place has unique translation names
2017-01-17 21:32:36 -08:00
Tobias Nyholm
eece8adfdd [Workflow] Added new validator to make sure each place has unique translation names 2017-01-17 21:32:36 -08:00
Fabien Potencier
9d09059cb5 bug #21323 [Cache] [PdoAdapter] Fix MySQL 1170 error (blob as primary key) (akeeman)
This PR was submitted for the master branch but it was merged into the 3.2 branch instead (closes #21323).

Discussion
----------

[Cache] [PdoAdapter] Fix MySQL 1170 error (blob as primary key)

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

When using a Doctrine\DBAL\Connection to initialize the PdoAdapter, PdoAdapter::createTable tries to create a table using a blob field as primary key. [This is not an option for MySQL](https://techjourney.net/mysql-error-1170-42000-blobtext-column-used-in-key-specification-without-a-key-length/), resulting in an exeption: `Syntax error or access violation: 1170 BLOB/TEXT column 'item_id' used in key specification without a key length`. This commit supplies a way to act like the non-Connection way creates the table does.

Commits
-------

08c6a650b9 [Cache] [PdoAdapter] Fix MySQL 1170 error (blob as primary key)
2017-01-17 15:05:43 -08:00
Arjan Keeman
08c6a650b9 [Cache] [PdoAdapter] Fix MySQL 1170 error (blob as primary key) 2017-01-17 15:05:43 -08:00
Fabien Potencier
1dfb1080b2 minor #21324 [FrameworkBundle] Fix third level headers for MarkdownDescriptor (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix third level headers for MarkdownDescriptor

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

`~` is not valid as an underlining char when using markdown on the contrary of reStructuredText.
See the rendering of [builder_1_public.md (before)](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md)  vs [builder_1_public.md (after)](https://github.com/ogizanagi/symfony/blob/fix/2.7/fwb/md_third_lvl_headers/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md) for instance.

This PR fixes it by using a third level header.

~~**EDIT:** There is no BC break. Wrong PR template information.~~

Commits
-------

ce29ab1d92 [FrameworkBundle] Fix third level headers for MarkdownDescriptor
2017-01-17 12:04:54 -08:00
Maxime Steinhausser
ce29ab1d92 [FrameworkBundle] Fix third level headers for MarkdownDescriptor 2017-01-17 19:39:37 +01:00
Fabien Potencier
84d0da2502 bug #21318 Don't add csp-headers if none are required (arjenm)
This PR was merged into the 3.2 branch.

Discussion
----------

Don't add csp-headers if none are required

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | This PR is also the ticket
| License       | MIT

In 3.2 a tool to adjust Content Security Policy headers in combination with the WebProfiler was added. We encountered a bug in its behavior.
We had CSP-headers that did not have a script-src/style-src nor a default-src (it was something like `form-action: https:`). In that scenario, the ContentSecurityPolicyHandler would add `script-src: 'unsafe-inline' 'nonce-....'`, but that would actually change the "everything is allowed scenario" into "only inline and nonce-... is allowed". The result was _only_ the javascript of WebProfiler was allowed, rather than everything.

This PR fixes the scenario where no default-src nor a script-src/style-src is provided. It simply continue's rather than treats it as an empty list of rules that need additional rules.

~A bug I did find, but not fix, is the fact that that `'unsafe-inline'` is ignored in at least Firefox and Chrome due to the fact there is also a nonce-element in the rule.~

Commits
-------

6fecc94103 Don't add csp-headers if none are required
2017-01-17 07:09:27 -08:00