[php-src] PR #24679: Fix GH-24493: preserve session data when upload-progress decoding fails

From: Date: Sun, 25 Oct 2026 11:16:25 +0000
Subject: [php-src] PR #24679: Fix GH-24493: preserve session data when upload-progress decoding fails
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-39858@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/24679 Author: programsurf Fixes #24493. During a multipart upload, the restricted upload-progress decoder can reject object properties that a regular session_start() accepts. The shared decode-failure handler then deletes the entire stored session, including unrelated application data. This change calls php_session_abort() when PS(in_rfc1867_update) is set and returns before the session is destroyed. The progress update is skipped without rewriting or deleting the stored record, allowing the application to read its session normally afterward. The reserved-property checks and incomplete_classes_only restriction remain unchanged. Decode failures outside upload-progress processing retain their existing behavior. Changes: - Add the upload-progress-specific abort path in php_session_cancel_decode(). - Update the reserved-property test to require the stored session record to remain intact. - Add a public-API round-trip test covering the three session serializers, reserved and ordinary property names, and both upload-progress cleanup settings. It checks successful upload, stored values, object alias identity, and an unchanged record after a rejected progress update. Related implementation: [lazerg/php-src@a45ffe71](https://github.com/lazerg/php-src/commit/a45ffe71a56741579f648d969193bd027a783e36), which uses the same abort-update approach.

« previous php.git-pulls (#39858) next »