[php-src] Issue #12941: session_set_cookie_params adds dot to domain
| From: | prowebuk | Date: | Tue, 12 Dec 2023 15:03:34 +0000 |
| Subject: | [php-src] Issue #12941: session_set_cookie_params adds dot to domain | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246043@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/12941
Author: prowebuk
### Description
The following code:
session_set_cookie_params(0,"/", $_SERVER["SERVER_NAME"], true, true);
session_start();
Resulted in the domain to be prepended with a dot even though this isn't specified
$_SERVER["SERVER_NAME"]="dev.myflexworks.com"
Session cookie domain = **.**dev.myflexworks.com
<img width="346" alt="image" src="https://github.com/php/php-src/assets/23273751/db9750a9-2ff2-460b-8ff2-2cc8b13e97ae">
Expected cookie domain to be: "dev.myflexworks.com"
### PHP Version
PHP 8.2.12
### Operating System
Debian 12 Bookworm