From 0b6d022e6fa9dc08ddbc8ba420cdd58a690cf852 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 04 Jun 2012 10:05:57 -0400
Subject: [PATCH] Fix magic_quotes_sybase handling (#1488506) Improved handling of critical PHP settings - try to set them to required value before die()
---
program/include/rcmail.php | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 4dba0e1..a10a2aa 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -546,15 +546,16 @@
if (is_array($default_host)) {
$post_host = rcube_utils::get_input_value('_host', rcube_utils::INPUT_POST);
+ $post_user = rcube_utils::get_input_value('_user', rcube_utils::INPUT_POST);
+
+ list($user, $domain) = explode('@', $post_user);
// direct match in default_host array
if ($default_host[$post_host] || in_array($post_host, array_values($default_host))) {
$host = $post_host;
}
-
// try to select host by mail domain
- list($user, $domain) = explode('@', rcube_utils::get_input_value('_user', rcube_utils::INPUT_POST));
- if (!empty($domain)) {
+ else if (!empty($domain)) {
foreach ($default_host as $storage_host => $mail_domains) {
if (is_array($mail_domains) && in_array_nocase($domain, $mail_domains)) {
$host = $storage_host;
--
Gitblit v1.9.1