diff --git a/controller.rst b/controller.rst index d2cb16261f1..ab04d9ecb51 100644 --- a/controller.rst +++ b/controller.rst @@ -188,8 +188,8 @@ For more information, see the :doc:`Routing chapter `. .. caution:: - The ``redirect()`` method does not check its destination in any way. If you - redirect to some URL provided by the end-users, your application may be open + The ``redirect()`` method does not check its destination in any way. If you + redirect to some URL provided by the end-users, your application may be open to the `unvalidated redirects security vulnerability`_. @@ -425,21 +425,43 @@ read any flash messages from the session: .. code-block:: html+twig {# app/Resources/views/base.html.twig #} - {% for flash_message in app.session.flashBag.get('notice') %} + + {# you can read and display just one flash message type... #} + {% for flash_message in app.session.flash('notice') %}