From a4a897d26d15202f2cebbaa179555674d2dc19e5 Mon Sep 17 00:00:00 2001
From: Lukas Reschke <lukas@owncloud.com>
Date: Fri, 15 Aug 2014 11:21:56 +0200
Subject: [PATCH] Remove ability to trigger DEBUG mode via cookie

Users should not be able to enable debug mode on their own by setting a cookie. Using debug mode might leak too much information about the environment or have other unexpected behaviour.

We should backport this.
---
 lib/base.php | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/lib/base.php b/lib/base.php
index ab1d8e9823..c3384fbeee 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -491,13 +491,6 @@ class OC {
 			require_once $vendorAutoLoad;
 		}
 
-		// set debug mode if an xdebug session is active
-		if (!defined('DEBUG') || !DEBUG) {
-			if (isset($_COOKIE['XDEBUG_SESSION'])) {
-				define('DEBUG', true);
-			}
-		}
-
 		if (!defined('PHPUNIT_RUN')) {
 			OC\Log\ErrorHandler::setLogger(OC_Log::$object);
 			if (defined('DEBUG') and DEBUG) {
-- 
GitLab