aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-02-25 15:30:45 +0100
committerMorris Jobke <hey@morrisjobke.de>2016-02-25 15:30:45 +0100
commitaebafadd99dc8d186139bcac7626b8c252b5fe30 (patch)
tree617b2a109c44152d53dd6d87dfde5d71d6b8bca8
parent1aa653177c53b0de86bbcd4bd353bf969eab77ae (diff)
parenta2338752c810dd0d82bff03ceed6d952e999f008 (diff)
downloadnextcloud-server-aebafadd99dc8d186139bcac7626b8c252b5fe30.tar.gz
nextcloud-server-aebafadd99dc8d186139bcac7626b8c252b5fe30.zip
Merge pull request #22632 from owncloud/stable8.1-backport-18762
[stable8.1] Use "json_encode" and "json_decode" instead of unserialize
-rw-r--r--apps/user_ldap/lib/connection.php4
-rw-r--r--apps/user_ldap/lib/proxy.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php
index 608c9a62069..4b6f7b01e6a 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/connection.php
@@ -206,7 +206,7 @@ class Connection extends LDAPUtility {
}
$key = $this->getCacheKey($key);
- return unserialize(base64_decode($this->cache->get($key)));
+ return json_decode(base64_decode($this->cache->get($key)), true);
}
/**
@@ -240,7 +240,7 @@ class Connection extends LDAPUtility {
return null;
}
$key = $this->getCacheKey($key);
- $value = base64_encode(serialize($value));
+ $value = base64_encode(json_encode($value));
$this->cache->set($key, $value, $this->configuration->ldapCacheTTL);
}
diff --git a/apps/user_ldap/lib/proxy.php b/apps/user_ldap/lib/proxy.php
index ef01213990c..2a423cb0e4b 100644
--- a/apps/user_ldap/lib/proxy.php
+++ b/apps/user_ldap/lib/proxy.php
@@ -161,7 +161,7 @@ abstract class Proxy {
}
$key = $this->getCacheKey($key);
- return unserialize(base64_decode($this->cache->get($key)));
+ return json_decode(base64_decode($this->cache->get($key)));
}
/**
@@ -185,7 +185,7 @@ abstract class Proxy {
return;
}
$key = $this->getCacheKey($key);
- $value = base64_encode(serialize($value));
+ $value = base64_encode(json_encode($value));
$this->cache->set($key, $value, '2592000');
}