summaryrefslogtreecommitdiff
path: root/net/phpldapadmin/files/patch-lib_common.php
diff options
context:
space:
mode:
authorKrzysztof <ports@bsdserwis.com>2022-12-08 10:23:03 +0100
committerRonald Klop <ronald@FreeBSD.org>2022-12-12 11:36:10 +0100
commit05adb0bbb787e824fd84aa7aed170182a55268e7 (patch)
tree4df4a77493b5bf13a4cdedccbd49bc2adaf911fa /net/phpldapadmin/files/patch-lib_common.php
parentgames/vkquake: update to 1.22.3 (diff)
net/phpldapadmin: additional fix to support for php81+
PR: 266678 268135 264672 Approved by: rene (mentor) Differential Revision: https://reviews.freebsd.org/D37633
Diffstat (limited to 'net/phpldapadmin/files/patch-lib_common.php')
-rw-r--r--net/phpldapadmin/files/patch-lib_common.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/phpldapadmin/files/patch-lib_common.php b/net/phpldapadmin/files/patch-lib_common.php
index 9e464a0fd2a1..33b76dae081a 100644
--- a/net/phpldapadmin/files/patch-lib_common.php
+++ b/net/phpldapadmin/files/patch-lib_common.php
@@ -12,3 +12,14 @@
}
$app['lang_http'] = array_unique($app['lang_http']);
+@@ -296,7 +296,9 @@ if ($app['language'] == 'auto') {
+ * Strip slashes from GET, POST, and COOKIE variables if this
+ * PHP install is configured to automatically addslashes()
+ */
+-if (@get_magic_quotes_gpc() && (! isset($slashes_stripped) || ! $slashes_stripped)) {
++if (@version_compare(phpversion(), '5.4.0', '<') &&
++ @get_magic_quotes_gpc() &&
++ (!isset($slashes_stripped) || !$slashes_stripped)) {
+ array_stripslashes($_REQUEST);
+ array_stripslashes($_GET);
+ array_stripslashes($_POST);