Skip to content

Commit 33d1288

Browse files
committed
feature #8716 Secure and Lazy session changes (weaverryan)
This PR was squashed before being merged into the 3.4 branch (closes #8716). Discussion ---------- Secure and Lazy session changes Fixes #8562 I believe that, in user-land, the only change is that the `framework.session.use_strict_mode` is deprecated, and that we need to say that session data is no longer written unless the session data actually changed. Commits ------- 3e28070 Removing limit_metadata_writes 0a0bca2 Removing use_strict_mode docs, as this feature is deprecated in 3.4
2 parents 2b2739c + 3e28070 commit 33d1288

File tree

3 files changed

+10
-86
lines changed

3 files changed

+10
-86
lines changed

_build/redirection_map

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
/cookbook/psr7 /components/psr7
195195
/cookbook/request/index /request
196196
/cookbook/request/load_balancer_reverse_proxy /deployment/proxies
197-
/cookbook/request/mime_type /reference/configuration/framework#formats
197+
/cookbook/request/mime_type /reference/configuration/framework
198198
/cookbook/routing/conditions /routing/conditions
199199
/cookbook/routing/custom_route_loader /routing/custom_route_loader
200200
/cookbook/routing/debug /routing/debug
@@ -244,7 +244,8 @@
244244
/cookbook/service_container/shared /service_container/shared
245245
/cookbook/session/avoid_session_start /session/avoid_session_start
246246
/cookbook/session/index /session
247-
/cookbook/session/limit_metadata_writes /session/limit_metadata_writes
247+
/cookbook/session/limit_metadata_writes /reference/configuration/framework
248+
/session/limit_metadata_writes /reference/configuration/framework
248249
/cookbook/session/locale_sticky_session /session/locale_sticky_session
249250
/cookbook/session/php_bridge /session/php_bridge
250251
/cookbook/session/proxy_examples /session/proxy_examples

reference/configuration/framework.rst

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ Configuration
7070
* `gc_divisor`_
7171
* `gc_probability`_
7272
* `gc_maxlifetime`_
73-
* `use_strict_mode`_
7473
* `save_path`_
7574
* `metadata_update_threshold`_
7675
* `assets`_
@@ -845,17 +844,6 @@ This determines the number of seconds after which data will be seen as "garbage"
845844
and potentially cleaned up. Garbage collection may occur during session
846845
start and depends on `gc_divisor`_ and `gc_probability`_.
847846

848-
use_strict_mode
849-
...............
850-
851-
**type**: ``boolean`` **default**: ``false``
852-
853-
This specifies whether the session module will use the strict session id mode.
854-
If this mode is enabled, the module does not accept uninitialized session IDs.
855-
If an uninitialized session ID is sent from browser, a new session ID is sent
856-
to browser. Applications are protected from session fixation via session
857-
adoption with strict mode.
858-
859847
save_path
860848
.........
861849

@@ -902,18 +890,19 @@ setting the value to ``null``:
902890
),
903891
));
904892
893+
.. _reference-session-metadata-update-threshold:
894+
905895
metadata_update_threshold
906896
.........................
907897

908898
**type**: ``integer`` **default**: ``0``
909899

910-
This is how many seconds to wait between two session metadata updates. It will
911-
also prevent the session handler to write if the session has not changed.
912-
913-
.. seealso::
900+
This is how many seconds to wait between updating/writing the session metadata. This
901+
can be useful if, for some reason, you want to limit the frequency at which the
902+
session persists.
914903

915-
You can see an example of the usage of this in
916-
:doc:`/session/limit_metadata_writes`.
904+
Starting in Symfony 3.4, session data is *only* written when the session data has
905+
changed. Previously, you needed to set this option to avoid that behavior.
917906

918907
assets
919908
~~~~~~

session/limit_metadata_writes.rst

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)