Skip to content

Commit fd291f5

Browse files
author
Tim Rogers
committed
Fix broken install if home directory contains invalid session name characters
1 parent 8e9c5ef commit fd291f5

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

install/index.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,21 @@
4040

4141
$debugInstaller = false; // Set to true to get more details on the installer pages (but breaks redirects)
4242
$includeLogoutButton = false; // Can be helpful testing installer
43-
$sessionName = 'WebCalendar-Install-' . __DIR__;
43+
$sessionName = 'WebCalendar-Install-' . str_replace(
44+
[
45+
'=',
46+
',',
47+
';',
48+
'.',
49+
'[',
50+
"\t",
51+
"\r",
52+
"\n",
53+
"\013",
54+
"\014",
55+
],
56+
'_',
57+
__DIR__);
4458

4559
if ($debugInstaller && isset($_GET['action']) && $_GET['action'] == 'logout') {
4660
session_name($sessionName);

0 commit comments

Comments
 (0)