Skip to content

Commit baae7f1

Browse files
committed
Merge branch '4.1' into 4.2
* 4.1: Add severity rankings to security policy Replaced the table of cache warmers by the debug:container command Add $user variable in ->createForm(...) Fix list of core cache warmers Remove minor bugs from docs. Fixed another link to MakerBundle Improving link to Maker Bundle
2 parents 6eff406 + 46f47e6 commit baae7f1

File tree

8 files changed

+89
-20
lines changed

8 files changed

+89
-20
lines changed

contributing/code/security.rst

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,78 @@ of the downstream projects included in this process:
9191
* Drupal (releases typically happen on Wednesdays)
9292
* eZPublish
9393

94+
Issue Severity
95+
--------------
96+
97+
In order to determine the severity of a security issue we take into account
98+
the complexity of any potential attack, the impact of the vulnerability and
99+
also how many projects it is likely to affect. This score out of 15 is then
100+
converted into a level of: Low, Medium, High, Critical, or Exceptional.
101+
102+
Attack Complexity
103+
~~~~~~~~~~~~~~~~~
104+
105+
*Score of between 1 and 5 depending on how complex it is to exploit the
106+
vulnerability*
107+
108+
* 4 - 5 Basic: attacker must follow a set of simple steps
109+
* 2 - 3 Complex: attacker must follow non-intuitive steps with a high level
110+
of dependencies
111+
* 1 - 2 High: A successful attack depends on conditions beyond the attacker's
112+
control. That is, a successful attack cannot be accomplished at will, but
113+
requires the attacker to invest in some measurable amount of effort in
114+
preparation or execution against the vulnerable component before a successful
115+
attack can be expected.
116+
117+
Impact
118+
~~~~~~
119+
120+
*Scores from the following areas are added together to produce a score. The
121+
score for Impact is capped at 6. Each area is scored between 0 and 4.*
122+
123+
* Integrity: Does this vulnerability cause non-public data to be accessible?
124+
If so, does the attacker have control over the data disclosed? (0-4)
125+
* Disclosure: Can this exploit allow system data (or data handled by the
126+
system) to be compromised? If so, does the attacker have control over
127+
modification? (0-4)
128+
* Code Execution: Does the vulnerability allow arbitrary code to be executed
129+
on an end-users system, or the server that it runs on? (0-4)
130+
* Availability: Is the availability of a service or application affected? Is
131+
it reduced availability or total loss of availability of a service /
132+
application? Availability includes networked services (e.g., databases) or
133+
resources such as consumption of network bandwidth, processor cycles, or
134+
disk space. (0-4)
135+
136+
Affected Projects
137+
~~~~~~~~~~~~~~~~~
138+
139+
*Scores from the following areas are added together to produce a score. The
140+
score for Affected Projects is capped at 4.*
141+
142+
* Will it affect some or all using a component? (1-2)
143+
* Is the usage of the component that would cause such a thing already
144+
considered bad practice? (0-1)
145+
* How common/popular is the component (e.g. Console vs HttpFoundation vs
146+
Lock)? (0-2)
147+
* Are a number of well-known open source projects using Symfony affected
148+
that requires coordinated releases? (0-1)
149+
150+
Score Totals
151+
~~~~~~~~~~~~
152+
153+
* Attack Complexity: 1 - 4
154+
* Impact: 1 - 6
155+
* Affected Projects: 1 - 4
156+
157+
Severity levels
158+
~~~~~~~~~~~~~~~
159+
160+
* Low: 1 - 5
161+
* Medium: 6 - 10
162+
* High: 11 - 12
163+
* Critical: 13 - 14
164+
* Exceptional: 15
165+
94166
Security Advisories
95167
-------------------
96168

controller.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ and ``redirect()`` methods::
148148
// redirect to a route with parameters
149149
return $this->redirectToRoute('app_lucky_number', array('max' => 10));
150150

151-
// redirects to a route and mantains the original query string parameters
151+
// redirects to a route and maintains the original query string parameters
152152
return $this->redirectToRoute('blog_show', $request->query->all());
153153

154154
// redirects externally

doctrine/registration_form.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ saves the user::
152152
public function register(Request $request, UserPasswordEncoderInterface $passwordEncoder): Response
153153
{
154154
$user = new User();
155-
$form = $this->createForm(RegistrationFormType::class);
155+
$form = $this->createForm(RegistrationFormType::class, $user);
156156
$form->handleRequest($request);
157157

158158
if ($form->isSubmitted() && $form->isValid()) {

introduction/from_flat_php_to_symfony2.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ of the application are isolated in a new file called ``model.php``::
181181
in this example, only a portion (or none) of the model is actually concerned
182182
with accessing a database.
183183

184-
The controller (``index.php``) is now is just a few lines of code::
184+
The controller (``index.php``) is now just a few lines of code::
185185

186186
// index.php
187187
require_once 'model.php';
@@ -262,7 +262,7 @@ an individual blog result based on a given id::
262262
{
263263
$connection = open_database_connection();
264264

265-
$query = 'SELECT created_at, title, body FROM post WHERE id=:id';
265+
$query = 'SELECT created_at, title, body FROM post WHERE id=:id';
266266
$statement = $connection->prepare($query);
267267
$statement->bindValue(':id', $id, PDO::PARAM_INT);
268268
$statement->execute();
@@ -533,7 +533,7 @@ a simple application. Along the way, you've made a simple routing
533533
system and a method using ``ob_start()`` and ``ob_get_clean()`` to render
534534
templates. If, for some reason, you needed to continue building this "framework"
535535
from scratch, you could at least use Symfony's standalone
536-
:doc:`Routing </components/routing>` and component and :doc:`Twig </templating>`,
536+
:doc:`Routing </components/routing>` component and :doc:`Twig </templating>`,
537537
which already solve these problems.
538538

539539
Instead of re-solving common problems, you can let Symfony take care of

reference/dic_tags.rst

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -400,18 +400,15 @@ can also register it manually:
400400
application and/or bundles should be prepared for when the contents
401401
generated by the cache warmer are not available.
402402

403-
Core Cache Warmers
404-
~~~~~~~~~~~~~~~~~~
405-
406-
+-------------------------------------------------------------------------------------------+-----------+
407-
| Cache Warmer Class Name | Priority |
408-
+===========================================================================================+===========+
409-
| :class:`Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\TemplatePathsCacheWarmer` | 20 |
410-
+-------------------------------------------------------------------------------------------+-----------+
411-
| :class:`Symfony\\Bundle\\FrameworkBundle\\CacheWarmer\\RouterCacheWarmer` | 0 |
412-
+-------------------------------------------------------------------------------------------+-----------+
413-
| :class:`Symfony\\Bundle\\TwigBundle\\CacheWarmer\\TemplateCacheCacheWarmer` | 0 |
414-
+-------------------------------------------------------------------------------------------+-----------+
403+
.. _core-cache-warmers:
404+
405+
In addition to your own cache warmers, Symfony components and third-party
406+
bundles define cache warmers too for their own purposes. You can list them all
407+
with the following command:
408+
409+
.. code-block:: terminal
410+
411+
$ php bin/console debug:container --tag=kernel.cache_warmer
415412
416413
.. _dic-tags-kernel-event-listener:
417414

security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,4 +1009,4 @@ Authorization (Denying Access)
10091009
.. _`HWIOAuthBundle`: https://github.com/hwi/HWIOAuthBundle
10101010
.. _`Symfony ACL bundle`: https://github.com/symfony/acl-bundle
10111011
.. _`Symfony Security screencast series`: https://symfonycasts.com/screencast/symfony-security
1012-
.. _`MakerBundle`: https://github.com/symfony/maker-bundle
1012+
.. _`MakerBundle`: https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html

security/form_login_setup.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,4 +315,4 @@ deal with this low level session variable. However, the
315315
:class:`Symfony\\Component\\Security\\Http\\Util\\TargetPathTrait` utility
316316
can be used to read (like in the example above) or set this value manually.
317317

318-
.. _`MakerBundle`: https://github.com/symfony/maker-bundle
318+
.. _`MakerBundle`: https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html

templating.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Throughout this article, template examples will be shown in both Twig and PHP.
125125
Twig can also do things that PHP can't, such as whitespace control,
126126
sandboxing, automatic HTML escaping, manual contextual output escaping,
127127
and the inclusion of custom functions and filters that only affect templates.
128-
Twig contains little features that make writing templates easier and more concise.
128+
Twig contains a lot of features that make writing templates easier and more concise.
129129
Take the following example, which combines a loop with a logical ``if``
130130
statement:
131131

0 commit comments

Comments
 (0)