Merge pull request #18762 from owncloud/use-json-instead-of-unserialize

Use "json_encode" and "json_decode" instead of unserialize
This commit is contained in:
Morris Jobke 2015-09-04 11:40:01 +02:00
commit c9457fdcad
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}

View File

@ -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');
}