Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ PHP NEWS
. Fixed bug GH-24461 (DISCARD ALL on persistent connection cleanup drops
PgBouncer's prepared statements). (David Carlier, Artem Ukrainskiy)

- Session:
. Changed default of session.upload_progress.enabled to 0. (jorgsowa)

- SAPI:
. Fixed infinite loop in sapi_header_op() for headers of 4 GiB or more.
(Martin Mirchev)
Expand Down
4 changes: 4 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ PHP 8.6 UPGRADE NOTES
explicitly set this to "None" (and also set session.cookie_secure
to 1).
RFC: https://wiki.php.net/rfc/session_security_defaults
. The default of session.upload_progress.enabled is now 0 (was 1). Upload
progress tracking writes request data into the session, so it is now
opt-in. Applications that read upload progress from $_SESSION must
explicitly set this to 1.
. SessionHandler::validateId() has been added and delegates to the
configured save handler. A subclass that declares validateId() without
a return type now emits a deprecation notice for the tentative bool
Expand Down
2 changes: 1 addition & 1 deletion ext/session/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ PHP_INI_BEGIN()

/* Upload progress */
STD_PHP_INI_BOOLEAN("session.upload_progress.enabled",
"1", ZEND_INI_PERDIR, OnUpdateBool, rfc1867_enabled, php_ps_globals, ps_globals)
"0", ZEND_INI_PERDIR, OnUpdateBool, rfc1867_enabled, php_ps_globals, ps_globals)
STD_PHP_INI_BOOLEAN("session.upload_progress.cleanup",
"1", ZEND_INI_PERDIR, OnUpdateBool, rfc1867_cleanup, php_ps_globals, ps_globals)
STD_PHP_INI_ENTRY("session.upload_progress.prefix",
Expand Down
10 changes: 10 additions & 0 deletions ext/session/tests/upload_progress_disabled_by_default.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--TEST--
session.upload_progress.enabled is disabled by default
--EXTENSIONS--
session
--FILE--
<?php
var_dump(ini_get('session.upload_progress.enabled'));
?>
--EXPECT--
string(1) "0"
8 changes: 4 additions & 4 deletions php.ini-development
Original file line number Diff line number Diff line change
Expand Up @@ -1445,11 +1445,11 @@ session.trans_sid_tags = "a=href,area=href,frame=src,form="
;session.trans_sid_hosts=""

; Enable upload progress tracking in $_SESSION
; Default Value: On
; Development Value: On
; Production Value: On
; Default Value: Off
; Development Value: Off
; Production Value: Off
; https://php.net/session.upload-progress.enabled
;session.upload_progress.enabled = On
;session.upload_progress.enabled = Off

; Cleanup the progress information as soon as all POST data has been read
; (i.e. upload completed).
Expand Down
8 changes: 4 additions & 4 deletions php.ini-production
Original file line number Diff line number Diff line change
Expand Up @@ -1447,11 +1447,11 @@ session.trans_sid_tags = "a=href,area=href,frame=src,form="
;session.trans_sid_hosts=""

; Enable upload progress tracking in $_SESSION
; Default Value: On
; Development Value: On
; Production Value: On
; Default Value: Off
; Development Value: Off
; Production Value: Off
; https://php.net/session.upload-progress.enabled
;session.upload_progress.enabled = On
;session.upload_progress.enabled = Off

; Cleanup the progress information as soon as all POST data has been read
; (i.e. upload completed).
Expand Down
Loading