From 6624ffd3cb9394bf897c6afafc2871447867077c Mon Sep 17 00:00:00 2001
From: Floorb <132411956+Neetpone@users.noreply.github.com>
Date: Sat, 10 Jul 2021 15:37:04 -0400
Subject: [PATCH] Remove magic quotes references (deprecated since PHP 5!)
---
.../ckeditor/samples/assets/posteddata.php | 5 +----
index.php | 15 ---------------
paste.php | 15 ---------------
3 files changed, 1 insertion(+), 34 deletions(-)
diff --git a/admin/js/plugins/ckeditor/samples/assets/posteddata.php b/admin/js/plugins/ckeditor/samples/assets/posteddata.php
index fd96f8f..6654166 100644
--- a/admin/js/plugins/ckeditor/samples/assets/posteddata.php
+++ b/admin/js/plugins/ckeditor/samples/assets/posteddata.php
@@ -32,10 +32,7 @@ if (!empty($_POST))
if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) )
continue;
- if ( get_magic_quotes_gpc() )
- $value = htmlspecialchars( stripslashes((string)$value) );
- else
- $value = htmlspecialchars( (string)$value );
+ $value = htmlspecialchars( (string)$value );
?>
|
diff --git a/index.php b/index.php
index 872843e..ecbe8ee 100644
--- a/index.php
+++ b/index.php
@@ -137,21 +137,6 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
}
}
-// Escape from quotes
-if (get_magic_quotes_gpc()) {
- function callback_stripslashes(&$val, $name)
- {
- if (get_magic_quotes_gpc())
- $val = stripslashes($val);
- }
- if (count($_GET))
- array_walk($_GET, 'callback_stripslashes');
- if (count($_POST))
- array_walk($_POST, 'callback_stripslashes');
- if (count($_COOKIE))
- array_walk($_COOKIE, 'callback_stripslashes');
-}
-
// Logout
if (isset($_GET['logout'])) {
header('Location: ' . $_SERVER['HTTP_REFERER']);
diff --git a/paste.php b/paste.php
index bc11b28..27e2476 100644
--- a/paste.php
+++ b/paste.php
@@ -109,21 +109,6 @@ if (isset($_GET['logout'])) {
session_destroy();
}
-// Escape from quotes
-if (get_magic_quotes_gpc()) {
- function callback_stripslashes(&$val, $name)
- {
- if (get_magic_quotes_gpc())
- $val = stripslashes($val);
- }
- if (count($_GET))
- array_walk($_GET, 'callback_stripslashes');
- if (count($_POST))
- array_walk($_POST, 'callback_stripslashes');
- if (count($_COOKIE))
- array_walk($_COOKIE, 'callback_stripslashes');
-}
-
// Page views
$site_view_rows = $conn->query("SELECT @last_id := MAX(id) FROM page_view");
while ($row = $site_view_rows->fetch()) {