Skip to content

Commit 7ac5f7b

Browse files
committed
Merge branch '2.8' into 3.4
* 2.8: Removed an extra blank line Reword and added a note Link to proxy configuration docs from the routing scheme page Fixed security expression testing user Mentioned Debian explicitly
2 parents 8496d80 + fb039a7 commit 7ac5f7b

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

components/http_foundation/session_configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ the ``php.ini`` directive ``session.gc_maxlifetime``. The meaning in this contex
139139
that any stored session that was saved more than ``gc_maxlifetime`` ago should be
140140
deleted. This allows one to expire records based on idle time.
141141

142-
However, some operating systems do their own session handling and set the
143-
``session.gc_probability`` variable to ``0`` to stop PHP doing garbage
142+
However, some operating systems (e.g. Debian) do their own session handling and set
143+
the ``session.gc_probability`` variable to ``0`` to stop PHP doing garbage
144144
collection. That's why Symfony now overwrites this value to ``1``.
145145

146146
If you wish to use the original value set in your ``php.ini``, add the following

security.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,15 +947,15 @@ You can also use expressions inside your templates:
947947
.. code-block:: html+jinja
948948

949949
{% if is_granted(expression(
950-
'"ROLE_ADMIN" in roles or (user and user.isSuperAdmin())'
950+
'"ROLE_ADMIN" in roles or (not is_anonymous() and user.isSuperAdmin())'
951951
)) %}
952952
<a href="...">Delete</a>
953953
{% endif %}
954954

955955
.. code-block:: html+php
956956

957957
<?php if ($view['security']->isGranted(new Expression(
958-
'"ROLE_ADMIN" in roles or (user and user.isSuperAdmin())'
958+
'"ROLE_ADMIN" in roles or (not is_anonymous() and user.isSuperAdmin())'
959959
))): ?>
960960
<a href="...">Delete</a>
961961
<?php endif; ?>

security/expressions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ accepts an :class:`Symfony\\Component\\ExpressionLanguage\\Expression` object::
1818
public function indexAction()
1919
{
2020
$this->denyAccessUnlessGranted(new Expression(
21-
'"ROLE_ADMIN" in roles or (user and user.isSuperAdmin())'
21+
'"ROLE_ADMIN" in roles or (not is_anonymous() and user.isSuperAdmin())'
2222
));
2323

2424
// ...

security/force_https.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,9 @@ role:
105105
106106
It is also possible to specify using HTTPS in the routing configuration,
107107
see :doc:`/routing/scheme` for more details.
108+
109+
.. note::
110+
111+
Forcing HTTPS while using a reverse proxy or load balancer requires a proper
112+
configuration to avoid infinite redirect loops; see :doc:`/deployment/proxies`
113+
for more details.

0 commit comments

Comments
 (0)