mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
bugfix: query serialization edge case
it did break when a "+" was present in the url, a rawurlencode was added, it is backward compatible because for pre-existing string, there is no % present so the unserialization's rawurldecode is without BC effect. SVN:trunk[5709]
This commit is contained in:
@@ -245,7 +245,7 @@ abstract class DBSearch
|
||||
public function serialize($bDevelopParams = false, $aContextParams = null)
|
||||
{
|
||||
$sOql = $this->ToOql($bDevelopParams, $aContextParams);
|
||||
return base64_encode(serialize(array($sOql, $this->GetInternalParams(), $this->m_aModifierProperties)));
|
||||
return rawurlencode(base64_encode(serialize(array($sOql, $this->GetInternalParams(), $this->m_aModifierProperties))));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -255,7 +255,7 @@ abstract class DBSearch
|
||||
*/
|
||||
static public function unserialize($sValue)
|
||||
{
|
||||
$aData = unserialize(base64_decode($sValue));
|
||||
$aData = unserialize(base64_decode(rawurldecode($sValue)));
|
||||
$sOql = $aData[0];
|
||||
$aParams = $aData[1];
|
||||
// We've tried to use gzcompress/gzuncompress, but for some specific queries
|
||||
|
||||
Reference in New Issue
Block a user