Skip to content

Commit ac45c0c

Browse files
Mutate some cautions to dangers
1 parent 0e17d00 commit ac45c0c

16 files changed

+18
-18
lines changed

components/http_foundation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ class, which can make this even easier::
718718
The ``JsonResponse`` class sets the ``Content-Type`` header to
719719
``application/json`` and encodes your data to JSON when needed.
720720

721-
.. caution::
721+
.. danger::
722722

723723
To avoid XSSI `JSON Hijacking`_, you should pass an associative array
724724
as the outermost array to ``JsonResponse`` and not an indexed array so

components/lock.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ instance, to clean up the ``/tmp`` directory or after a reboot of the machine
843843
when a directory uses ``tmpfs``. It's not an issue if the lock is released when
844844
the process ended, but it is in case of ``Lock`` reused between requests.
845845

846-
.. caution::
846+
.. danger::
847847

848848
Do not store locks on a volatile file system if they have to be reused in
849849
several requests.
@@ -876,7 +876,7 @@ When the Memcached service is shared and used for multiple usage, Locks could be
876876
removed by mistake. For instance some implementation of the PSR-6 ``clear()``
877877
method uses the Memcached's ``flush()`` method which purges and removes everything.
878878

879-
.. caution::
879+
.. danger::
880880

881881
The method ``flush()`` must not be called, or locks should be stored in a
882882
dedicated Memcached service away from Cache.
@@ -984,7 +984,7 @@ be lost without notifying the running processes.
984984
When the Redis service is shared and used for multiple usages, locks could be
985985
removed by mistake.
986986

987-
.. caution::
987+
.. danger::
988988

989989
The command ``FLUSHDB`` must not be called, or locks should be stored in a
990990
dedicated Redis service away from Cache.

components/process.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ are done doing other stuff::
251251
**synchronously** inside this event. Be aware that ``kernel.terminate``
252252
is called only if you use PHP-FPM.
253253

254-
.. caution::
254+
.. danger::
255255

256256
Beware also that if you do that, the said PHP-FPM process will not be
257257
available to serve any new request until the subprocess is finished. This

components/yaml.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ And parse them by using the ``PARSE_OBJECT`` flag::
239239
The YAML component uses PHP's ``serialize()`` method to generate a string
240240
representation of the object.
241241

242-
.. caution::
242+
.. danger::
243243

244244
Object serialization is specific to this implementation, other PHP YAML
245245
parsers will likely not recognize the ``php/object`` tag and non-PHP

configuration.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ To do so, define a parameter with the same name as the env var using this syntax
737737
always exists, because its value will be ``null`` when the related env var
738738
is not defined.
739739

740-
.. caution::
740+
.. danger::
741741

742742
Beware that dumping the contents of the ``$_SERVER`` and ``$_ENV`` variables
743743
or outputting the ``phpinfo()`` contents will display the values of the

configuration/secrets.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ running:
5050
This will generate ``config/secrets/prod/prod.encrypt.public.php`` and
5151
``config/secrets/prod/prod.decrypt.private.php``.
5252

53-
.. caution::
53+
.. danger::
5454

5555
The ``prod.decrypt.private.php`` file is highly sensitive. Your team of developers
5656
and even Continuous Integration services don't need that key. If the

controller.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ and ``redirect()`` methods::
146146
return $this->redirect('http://symfony.com/doc');
147147
}
148148

149-
.. caution::
149+
.. danger::
150150

151151
The ``redirect()`` method does not check its destination in any way. If you
152152
redirect to a URL provided by end-users, your application may be open

deployment/proxies.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ and what headers your reverse proxy uses to send information:
104104
# ...
105105
trusted_proxies: '%env(TRUSTED_PROXIES)%'
106106
107-
.. caution::
107+
.. danger::
108108

109109
Enabling the ``Request::HEADER_X_FORWARDED_HOST`` option exposes the
110110
application to `HTTP Host header attacks`_. Make sure the proxy really

http_cache/cache_invalidation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Then, register the class as a service that :doc:`decorates </service_container/s
136136
;
137137
};
138138
139-
.. caution::
139+
.. danger::
140140

141141
You must protect the ``PURGE`` HTTP method somehow to avoid random people
142142
purging your cached data.

http_cache/ssi.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The SSI instructions are done via HTML comments:
2727
There are some other `available directives`_ but
2828
Symfony manages only the ``#include virtual`` one.
2929

30-
.. caution::
30+
.. danger::
3131

3232
Be careful with SSI, your website may fall victim to injections.
3333
Please read this `OWASP article`_ first!

profiler.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Profiler
44
The profiler is a powerful **development tool** that gives detailed information
55
about the execution of any request.
66

7-
.. caution::
7+
.. danger::
88

99
**Never** enable the profiler in production environments
1010
as it will lead to major security vulnerabilities in your project.

rate_limiter.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Symfony uses these rate limiters in built-in features like :ref:`login throttlin
1515
which limits how many failed login attempts a user can make in a given period of
1616
time, but you can use them for your own features too.
1717

18-
.. caution::
18+
.. danger::
1919

2020
By definition, the Symfony rate limiters require Symfony to be booted
2121
in a PHP process. This makes them not useful to protect against `DoS attacks`_.

reference/configuration/twig.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ autoescape
4141
If set to ``false``, automatic escaping is disabled (you can still escape each content
4242
individually in the templates).
4343

44-
.. caution::
44+
.. danger::
4545

4646
Setting this option to ``false`` is dangerous and it will make your
4747
application vulnerable to `XSS attacks`_ because most third-party bundles

security.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ The form can look like anything, but it usually follows some conventions:
827827
Actually, all of this can be configured under the ``form_login`` key. See
828828
:ref:`reference-security-firewall-form-login` for more details.
829829

830-
.. caution::
830+
.. danger::
831831

832832
This login form is currently not protected against CSRF attacks. Read
833833
:ref:`form_login-csrf` on how to protect your login form.

serializer.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ custom normalizers and/or encoders can also be loaded by tagging them as
9090
:ref:`serializer.encoder <reference-dic-tags-serializer-encoder>`. It's also
9191
possible to set the priority of the tag in order to decide the matching order.
9292

93-
.. caution::
93+
.. danger::
9494

9595
Always make sure to load the ``DateTimeNormalizer`` when serializing the
9696
``DateTime`` or ``DateTimeImmutable`` classes to avoid excessive memory

session.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,7 @@ Then, register the ``SodiumMarshaller`` service using this key:
15731573
]);
15741574
};
15751575
1576-
.. caution::
1576+
.. danger::
15771577

15781578
This will encrypt the values of the cache items, but not the cache keys. Be
15791579
careful not to leak sensitive data in the keys.

0 commit comments

Comments
 (0)