From b17c00c05cadaedea3481ffbda00e7c2f6695972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 12 Jul 2020 10:34:01 +0300 Subject: [PATCH] Make code symmetric: Check on ConditionalGet as well This partly reverts 5705fc9d899843fe8f6b6e0d361ccf01974b34a1 --- lib/HTTP/ConditionalGet.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/HTTP/ConditionalGet.php b/lib/HTTP/ConditionalGet.php index 8bfd0af..6087c04 100644 --- a/lib/HTTP/ConditionalGet.php +++ b/lib/HTTP/ConditionalGet.php @@ -317,7 +317,9 @@ class HTTP_ConditionalGet if (!isset($_SERVER['HTTP_IF_NONE_MATCH'])) { return false; } - $clientEtagList = $_SERVER['HTTP_IF_NONE_MATCH']; + $clientEtagList = PHP_VERSION_ID < 50400 && get_magic_quotes_gpc() + ? stripslashes($_SERVER['HTTP_IF_NONE_MATCH']) + : $_SERVER['HTTP_IF_NONE_MATCH']; $clientEtags = explode(',', $clientEtagList); $compareTo = $this->normalizeEtag($this->_etag);