diff --git a/extension/Classes/Core/Database/Database.php b/extension/Classes/Core/Database/Database.php index d22f9dcb31aa446a3b6dd5e5d0cce091a15a8c5e..59a0ed1055155d9e71908e60ba9e4e8f95088241 100644 --- a/extension/Classes/Core/Database/Database.php +++ b/extension/Classes/Core/Database/Database.php @@ -402,15 +402,17 @@ class Database { // Author: Enis Nuredini // Get method from query and remove it from the sql variable to get a valid mysqli_stmt. Store given method in system store - $needle = 'AS _encrypt='; - if (mb_strpos($sql, $needle)) { - $preparedSql = explode('AS _encrypt=', $sql); - $sql = $preparedSql[0] . ' AS _encrypt'; - $encryptionMethod = $preparedSql[1]; - $this->store::setVar(ENCRYPTION_CIPHER_METHOD_COLUMN_NAME, $encryptionMethod, STORE_SYSTEM); - } else if ($this->store::getVar(ENCRYPTION_CIPHER_METHOD_COLUMN_NAME, STORE_SYSTEM, SANITIZE_ALLOW_ALL) !== null) { - $this->store::unsetVar(ENCRYPTION_CIPHER_METHOD_COLUMN_NAME, STORE_SYSTEM); - } + // Krzysztof Putyra: commented out, because it breaks SQL statements. + // If this feature is needed, a smart parser must be used +// $needle = 'AS _encrypt='; +// if (mb_strpos($sql, $needle)) { +// $preparedSql = explode('AS _encrypt=', $sql); +// $sql = $preparedSql[0] . ' AS _encrypt'; +// $encryptionMethod = $preparedSql[1]; +// $this->store::setVar(ENCRYPTION_CIPHER_METHOD_COLUMN_NAME, $encryptionMethod, STORE_SYSTEM); +// } else if ($this->store::getVar(ENCRYPTION_CIPHER_METHOD_COLUMN_NAME, STORE_SYSTEM, SANITIZE_ALLOW_ALL) !== null) { +// $this->store::unsetVar(ENCRYPTION_CIPHER_METHOD_COLUMN_NAME, STORE_SYSTEM); +// } // End from author if (false === ($this->mysqli_stmt = $this->mysqli->prepare($sql))) { diff --git a/extension/Classes/Core/Report/Report.php b/extension/Classes/Core/Report/Report.php index ce3b53ea6aa9d562efaae067468b4751d2cad035..387711654019a0df699cd0a8b936642f4a1a190d 100644 --- a/extension/Classes/Core/Report/Report.php +++ b/extension/Classes/Core/Report/Report.php @@ -853,10 +853,11 @@ class Report { // Author: Enis Nuredini // Split and get given encryption method from column name + // Fixed temporarily by Krzysztof Putyra $encryptionMethod = null; $key = $arr[0]; $keyArray = explode('=', $key, 2); - if (isset($keyArray[1]) && $keyArray[1] !== '' && $keyArray[0] === COLUMN_ENCRYPT) { + if (isset($keyArray[1]) && $keyArray[1] !== '' && $keyArray[0] === TOKEN_COLUMN_CTRL . COLUMN_ENCRYPT) { $encryptionMethod = $keyArray[1]; $arr[0] = $keyArray[0]; }