php / php/php-src

session.lazy_write only implemented if user defines custom handler with updateTimestamp method - Incorrect behavior

Aperta
#15,135 6 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@devnexen ci sta già lavorando.

Dal 29/7/2024.

Extension: session Feature Status: Needs Triage
Lingua principale
C
Stelle
40.4k
Fork
8.1k
Merge medio
2g 13h
PR unite (30g)
96

Descrizione

Description

The following code:

https://github.com/php/php-src/blob/21e01f3e70308824169632d5a16047f9df52fac9/ext/session/session.c#L515-L522

Will not call updateTimestamp unless PS(mod)->s_update_timestamp exists & is different to the inbuilt updateTimestamp function (php_session_update_timestamp defined in https://github.com/php/php-src/blob/21e01f3e70308824169632d5a16047f9df52fac9/ext/session/session.c#L1105). It will always call the standard inbuilt file write handler instead.

Given that session.lazy_write defaults to 1 --> True, the expectation is that the session file will not be overwritten if there isn't a change in session value. But this will always happen unless there is a defined custom handler.

PHP Version

PHP 8.2

Operating System

Ubuntu 22.04 LTS

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.