[php-src] master: Merge branch 'PHP-8.6'
| From: | Daniel Scherzer | Date: | Mon, 19 Oct 2026 20:41:16 +0000 |
| Subject: | [php-src] master: Merge branch 'PHP-8.6' | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-142474@lists.php.net to get a copy of this message | ||
Author: Daniel Scherzer (DanielEScherzer)
Date: 2026-10-19T13:40:48-07:00
Commit: https://github.com/php/php-src/commit/2cd89ebb077f436f7d6a3dfc29a6172d1397639c
Raw diff: https://github.com/php/php-src/commit/2cd89ebb077f436f7d6a3dfc29a6172d1397639c.diff
Merge branch 'PHP-8.6'
* PHP-8.6:
LiteSpeed: document security considerations for INI overrides (#23806)
Changed paths:
M sapi/litespeed/README.md
M sapi/litespeed/lsapi_main.c
Diff:
diff --git a/sapi/litespeed/README.md b/sapi/litespeed/README.md
index 86037732953a..3174bb55ad74 100644
--- a/sapi/litespeed/README.md
+++ b/sapi/litespeed/README.md
@@ -76,6 +76,14 @@ have lsphp bind to address 192.168.0.2:3000,
have lsphp accept request on Unix domain socket
/tmp/lsphp_manual.sock.
+### INI Security
+
+The lsphp listener must only be reachable by trusted sources, generally just
+the LiteSpeed web front end. Any source that can set its own environment variables
+can configure arbitrary PHP INI directives at the ZEND_INI_SYSTEM level for
+that request. This is the equivalent level of access as the Apache
+php_admin_value directive or the FPM's PHP_ADMIN_VALUE parameter.
+
## Using LiteSpeed PHP with LiteSpeed Web Server
Detailed information about how to configure LiteSpeed web server with PHP
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
index d4e8328b3a2f..912480158870 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -773,6 +773,11 @@ static int lsapi_module_main(int show_source)
}
+/* The use of type = ZEND_INI_SYSTEM when the key starts with \x01\x04 is
+ * intentional - this is the mechanism by which LiteSpeed communicates the
+ * system-level INI options that should be set. This is only called from
+ * override_ini() with LSAPI_ForeachSpecialEnv(). See README.md in this
+ * directory for more details. */
static int alter_ini( const char * pKey, int keyLen, const char * pValue, int valLen,
void * arg )
{