diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-09-02 12:12:31 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-09-02 12:26:37 +0200 |
commit | 36e26c6f090ae3fa5ebc678cce216820ff21a3e7 (patch) | |
tree | 785cd741761d6897443cca56c24c5cbf6db87f6c /apps/user_ldap/lib | |
parent | 453937711376239093d7e1634b7f96a6a5f18fc7 (diff) | |
download | nextcloud-server-36e26c6f090ae3fa5ebc678cce216820ff21a3e7.tar.gz nextcloud-server-36e26c6f090ae3fa5ebc678cce216820ff21a3e7.zip |
Use "json_encode" and "json_decode" instead of unserialize
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r-- | apps/user_ldap/lib/connection.php | 4 | ||||
-rw-r--r-- | apps/user_ldap/lib/proxy.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index 6f2fdce1b5f..f6b123babd0 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))); } /** @@ -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'); } |