File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -232,8 +232,8 @@ transparent encryption layer via the ``CryptoSessionData`` class. Data written t
232232``OCP\ISession `` API benefits from these optimizations and is automatically encrypted at rest.
233233
234234.. danger ::
235- Never use PHP superglobals like ``$_SESSION ``. This bypasses Nextcloud's encryption and
236- lifecycle management. leading to race conditions or lost data.
235+ Never use the PHP superglobal ``$_SESSION ``. The superglobal bypasses Nextcloud's encryption and
236+ lifecycle management, leading to race conditions or lost data.
237237
238238Basic usage
239239~~~~~~~~~~~
@@ -305,6 +305,9 @@ Use the ``#[UseSession]`` attribute when:
305305 I/O overhead from repeated open/close cycles).
306306* **Reference Manipulation **: You need the session to remain open for complex logic or to ensure data
307307 consistency throughout the method.
308+ * **Regenerating session ids **: You are elevating a user's privileges (e.g. a valid share password is
309+ entered and the "access granted" status is stored in the session) or the user performs a sensitive
310+ alteration (e.g. password change).
308311
309312.. note ::
310313 The ``#[UseSession] `` attribute was introduced in Nextcloud 26. Previously, this feature used the
You can’t perform that action at this time.
0 commit comments