From 48ab1add3548beecedb60e6355e4c4dbfb1d6bc1 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 06 Nov 2015 02:35:44 -0500
Subject: [PATCH] Add workaround for https://bugs.php.net/bug.php?id=70757 (#1490582)
---
program/lib/Roundcube/rcube.php | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php
index 9ea0681..5fe4a4b 100644
--- a/program/lib/Roundcube/rcube.php
+++ b/program/lib/Roundcube/rcube.php
@@ -464,8 +464,13 @@
// use database for storing session data
$this->session = new rcube_session($this->get_dbh(), $this->config);
+ $path = $_SERVER['SCRIPT_NAME'];
+ if (strpos($path, '://')) {
+ $path = parse_url($path, PHP_URL_PATH); // #1490582
+ }
+
$this->session->register_gc_handler(array($this, 'gc'));
- $this->session->set_secret($this->config->get('des_key') . dirname($_SERVER['SCRIPT_NAME']));
+ $this->session->set_secret($this->config->get('des_key') . dirname($path));
$this->session->set_ip_check($this->config->get('ip_check'));
if ($this->config->get('session_auth_name')) {
--
Gitblit v1.9.1