Skip to content

Commit 0e66933

Browse files
committed
Merge branch '2.8' into 3.4
* 2.8: Improved the multiple user providers article Removed a no longer relevant text Update NotBlank constraint description Added a minor note about Composer's plaform config Update choice_attr.rst.inc
2 parents 0ecfb40 + 44baa5f commit 0e66933

File tree

5 files changed

+42
-42
lines changed

5 files changed

+42
-42
lines changed

contributing/code/security.rst

+4-39
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ confirmed, the core team works on a solution following these steps:
3737
#. Package new versions for all affected versions;
3838
#. Publish the post on the official Symfony `blog`_ (it must also be added to
3939
the "`Security Advisories`_" category);
40-
#. Update the security advisory list (see below).
4140
#. Update the public `security advisories database`_ maintained by the
4241
FriendsOfPHP organization and which is used by the ``security:check`` command.
4342

@@ -100,47 +99,13 @@ Security Advisories
10099
You can check your Symfony application for known security vulnerabilities
101100
using the ``security:check`` command (see :doc:`/security/security_checker`).
102101

103-
This section indexes security vulnerabilities that were fixed in Symfony
104-
releases, starting from Symfony 1.0.0:
105-
106-
* Jul 17, 2017, `CVE-2017-11365: Empty passwords validation issue <https://symfony.com/blog/cve-2017-11365-empty-passwords-validation-issue>`_ (2.7.30, 2.7.31, 2.8.23, 2.8.24, 3.2.10, 3.2.11, 3.3.3, and 3.3.4)
107-
* May 9, 2016: `CVE-2016-2403: Unauthorized access on a misconfigured Ldap server when using an empty password <https://symfony.com/blog/cve-2016-2403-unauthorized-access-on-a-misconfigured-ldap-server-when-using-an-empty-password>`_ (2.8.0-2.8.5, 3.0.0-3.0.5)
108-
* May 9, 2016: `CVE-2016-4423: Large username storage in session <https://symfony.com/blog/cve-2016-4423-large-username-storage-in-session>`_ (2.3.0-2.3.40, 2.7.0-2.7.12, 2.8.0-2.8.5, 3.0.0-3.0.5)
109-
* January 18, 2016: `CVE-2016-1902: SecureRandom's fallback not secure when OpenSSL fails <https://symfony.com/blog/cve-2016-1902-securerandom-s-fallback-not-secure-when-openssl-fails>`_ (2.3.0-2.3.36, 2.6.0-2.6.12, 2.7.0-2.7.8)
110-
* November 23, 2015: `CVE-2015-8125: Potential Remote Timing Attack Vulnerability in Security Remember-Me Service <https://symfony.com/blog/cve-2015-8125-potential-remote-timing-attack-vulnerability-in-security-remember-me-service>`_ (2.3.35, 2.6.12 and 2.7.7)
111-
* November 23, 2015: `CVE-2015-8124: Session Fixation in the "Remember Me" Login Feature <https://symfony.com/blog/cve-2015-8124-session-fixation-in-the-remember-me-login-feature>`_ (2.3.35, 2.6.12 and 2.7.7)
112-
* May 26, 2015: `CVE-2015-4050: ESI unauthorized access <https://symfony.com/blog/cve-2015-4050-esi-unauthorized-access>`_ (Symfony 2.3.29, 2.5.12 and 2.6.8)
113-
* April 1, 2015: `CVE-2015-2309: Unsafe methods in the Request class <https://symfony.com/blog/cve-2015-2309-unsafe-methods-in-the-request-class>`_ (Symfony 2.3.27, 2.5.11 and 2.6.6)
114-
* April 1, 2015: `CVE-2015-2308: Esi Code Injection <https://symfony.com/blog/cve-2015-2308-esi-code-injection>`_ (Symfony 2.3.27, 2.5.11 and 2.6.6)
115-
* September 3, 2014: `CVE-2014-6072: CSRF vulnerability in the Web Profiler <https://symfony.com/blog/cve-2014-6072-csrf-vulnerability-in-the-web-profiler>`_ (Symfony 2.3.19, 2.4.9 and 2.5.4)
116-
* September 3, 2014: `CVE-2014-6061: Security issue when parsing the Authorization header <https://symfony.com/blog/cve-2014-6061-security-issue-when-parsing-the-authorization-header>`_ (Symfony 2.3.19, 2.4.9 and 2.5.4)
117-
* September 3, 2014: `CVE-2014-5245: Direct access of ESI URLs behind a trusted proxy <https://symfony.com/blog/cve-2014-5245-direct-access-of-esi-urls-behind-a-trusted-proxy>`_ (Symfony 2.3.19, 2.4.9 and 2.5.4)
118-
* September 3, 2014: `CVE-2014-5244: Denial of service with a malicious HTTP Host header <https://symfony.com/blog/cve-2014-5244-denial-of-service-with-a-malicious-http-host-header>`_ (Symfony 2.3.19, 2.4.9 and 2.5.4)
119-
* July 15, 2014: `Security releases: Symfony 2.3.18, 2.4.8, and 2.5.2 released <https://symfony.com/blog/security-releases-cve-2014-4931-symfony-2-3-18-2-4-8-and-2-5-2-released>`_ (`CVE-2014-4931 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-4931>`_)
120-
* October 10, 2013: `Security releases: Symfony 2.0.25, 2.1.13, 2.2.9, and 2.3.6 released <https://symfony.com/blog/security-releases-cve-2013-5958-symfony-2-0-25-2-1-13-2-2-9-and-2-3-6-released>`_ (`CVE-2013-5958 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-5958>`_)
121-
* August 7, 2013: `Security releases: Symfony 2.0.24, 2.1.12, 2.2.5, and 2.3.3 released <https://symfony.com/blog/security-releases-symfony-2-0-24-2-1-12-2-2-5-and-2-3-3-released>`_ (`CVE-2013-4751 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4751>`_ and `CVE-2013-4752 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4752>`_)
122-
* January 17, 2013: `Security release: Symfony 2.0.22 and 2.1.7 released <https://symfony.com/blog/security-release-symfony-2-0-22-and-2-1-7-released>`_ (`CVE-2013-1348 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1348>`_ and `CVE-2013-1397 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1397>`_)
123-
* December 20, 2012: `Security release: Symfony 2.0.20 and 2.1.5 <https://symfony.com/blog/security-release-symfony-2-0-20-and-2-1-5-released>`_ (`CVE-2012-6431 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-6431>`_ and `CVE-2012-6432 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-6432>`_)
124-
* November 29, 2012: `Security release: Symfony 2.0.19 and 2.1.4 <https://symfony.com/blog/security-release-symfony-2-0-19-and-2-1-4>`_
125-
* November 25, 2012: `Security release: symfony 1.4.20 released <https://symfony.com/blog/security-release-symfony-1-4-20-released>`_ (`CVE-2012-5574 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-5574>`_)
126-
* August 28, 2012: `Security Release: Symfony 2.0.17 released <https://symfony.com/blog/security-release-symfony-2-0-17-released>`_
127-
* May 30, 2012: `Security Release: symfony 1.4.18 released <https://symfony.com/blog/security-release-symfony-1-4-18-released>`_ (`CVE-2012-2667 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2667>`_)
128-
* February 24, 2012: `Security Release: Symfony 2.0.11 released <https://symfony.com/blog/security-release-symfony-2-0-11-released>`_
129-
* November 16, 2011: `Security Release: Symfony 2.0.6 <https://symfony.com/blog/security-release-symfony-2-0-6>`_
130-
* March 21, 2011: `symfony 1.3.10 and 1.4.10: security releases <https://symfony.com/blog/symfony-1-3-10-and-1-4-10-security-releases>`_
131-
* June 29, 2010: `Security Release: symfony 1.3.6 and 1.4.6 <https://symfony.com/blog/security-release-symfony-1-3-6-and-1-4-6>`_
132-
* May 31, 2010: `symfony 1.3.5 and 1.4.5 <https://symfony.com/blog/symfony-1-3-5-and-1-4-5>`_
133-
* February 25, 2010: `Security Release: 1.2.12, 1.3.3 and 1.4.3 <https://symfony.com/blog/security-release-1-2-12-1-3-3-and-1-4-3>`_
134-
* February 13, 2010: `symfony 1.3.2 and 1.4.2 <https://symfony.com/blog/symfony-1-3-2-and-1-4-2>`_
135-
* April 27, 2009: `symfony 1.2.6: Security fix <https://symfony.com/blog/symfony-1-2-6-security-fix>`_
136-
* October 03, 2008: `symfony 1.1.4 released: Security fix <https://symfony.com/blog/symfony-1-1-4-released-security-fix>`_
137-
* May 14, 2008: `symfony 1.0.16 is out <https://symfony.com/blog/symfony-1-0-16-is-out>`_
138-
* April 01, 2008: `symfony 1.0.13 is out <https://symfony.com/blog/symfony-1-0-13-is-out>`_
139-
* March 21, 2008: `symfony 1.0.12 is (finally) out ! <https://symfony.com/blog/symfony-1-0-12-is-finally-out>`_
140-
* June 25, 2007: `symfony 1.0.5 released (security fix) <https://symfony.com/blog/symfony-1-0-5-released-security-fix>`_
102+
Check the `Security Advisories`_ blog category for a list of all security
103+
vulnerabilities that were fixed in Symfony releases, starting from Symfony
104+
1.0.0.
141105

142106
.. _Git repository: https://github.com/symfony/symfony
143107
.. _blog: https://symfony.com/blog/
144108
.. _Security Advisories: https://symfony.com/blog/category/security-advisories
145109
.. _`security advisories database`: https://github.com/FriendsOfPHP/security-advisories
146110
.. _`mitre.org`: https://cveform.mitre.org/
111+
.. _`Security Advisories`: https://symfony.com/blog/category/security-advisories

reference/constraints/NotBlank.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ NotBlank
22
========
33

44
Validates that a value is not blank - meaning not equal to a blank string,
5-
a blank array or ``null``::
5+
a blank array, ``null`` or ``false``::
66

77
if (false === $value || (empty($value) && '0' != $value)) {
88
// validation will fail

reference/forms/types/options/choice_attr.rst.inc

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ choice_attr
33

44
**type**: ``array``, ``callable`` or ``string`` **default**: ``array()``
55

6-
Use this to add additional HTML attributes to each choice. This can be an array
7-
of attributes (if they are the same for each choice), a callable or a property path
6+
Use this to add additional HTML attributes to each choice. This can be
7+
an associative array where the keys match the choice keys and the values
8+
are the attributes for each choice, a callable or a property path
89
(just like `choice_label`_).
910

1011
If an array, the keys of the ``choices`` array must be used as keys::

security/multiple_user_providers.rst

+26
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
How to Use multiple User Providers
22
==================================
33

4+
.. note::
5+
6+
It's always better to use a specific user provider for each authentication
7+
mechanism. Chaining user providers should be avoided in most applications
8+
and used only to solve edge cases.
9+
410
Each authentication mechanism (e.g. HTTP Authentication, form login, etc)
511
uses exactly one user provider, and will use the first declared user provider
612
by default. But what if you want to specify a few users via configuration
@@ -156,5 +162,25 @@ system will use the ``in_memory`` user provider. But if the user tries to
156162
log in via the form login, the ``user_db`` provider will be used (since it's
157163
the default for the firewall as a whole).
158164

165+
If you need to check that the user being returned by your provider is a allowed
166+
to authenticate, check the returned user object::
167+
168+
use Symfony\Component\Security\Core\User;
169+
// ...
170+
171+
public function loadUserByUsername($username)
172+
{
173+
// ...
174+
175+
// you can, for example, test that the returned user is an object of a
176+
// particular class or check for certain attributes of your user objects
177+
if ($user instance User) {
178+
// the user was loaded from the main security config file. Do something.
179+
// ...
180+
}
181+
182+
return $user;
183+
}
184+
159185
For more information about user provider and firewall configuration, see
160186
the :doc:`/reference/configuration/security`.

setup/_update_dep_errors.rst.inc

+8
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,11 @@ the issue.
1919
2020
Or, you may have deeper issues where different libraries depend on conflicting
2121
versions of other libraries. Check your error message to debug.
22+
23+
Another issue that may happen is that the project dependencies can be installed
24+
in your local computer but not on the remote server. This usually happens when
25+
the PHP versions are different on each machine. The solution is to add the
26+
`platform`_ config option in your `composer.json` file to define the highest
27+
PHP version allowed for the dependencies (set it to server's PHP version).
28+
29+
.. _`platform`: https://getcomposer.org/doc/06-config.md#platform

0 commit comments

Comments
 (0)