From 969cefa58154588d31b4d4c8497f7f63f303aa78 Mon Sep 17 00:00:00 2001
From: till <till@php.net>
Date: Tue, 28 Aug 2007 22:09:42 -0400
Subject: [PATCH] # fixed: #1484517

---
 index.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.php b/index.php
index 6e8b7ff..ff99098 100644
--- a/index.php
+++ b/index.php
@@ -71,6 +71,7 @@
 ini_set('session.gc_maxlifetime', 21600);
 ini_set('session.gc_divisor', 500);
 ini_set('error_reporting', E_ALL&~E_NOTICE); 
+set_magic_quotes_runtime(0);
 
 // increase maximum execution time for php scripts
 // (does not work in safe mode)
@@ -221,8 +222,7 @@
 // check client X-header to verify request origin
 if ($OUTPUT->ajax_call)
 {
-  $hdrs = getallheaders();
-  if (empty($hdrs['X-RoundCube-Referer']) && empty($CONFIG['devel_mode']))
+  if (empty($CONFIG['devel_mode']) && !rc_request_header('X-RoundCube-Referer'))
   {
     header('HTTP/1.1 404 Not Found');
     die("Invalid Request");

--
Gitblit v1.9.1