Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 1.7.8.7 into 1.7.8.x [merge] #29153

Merged
merged 4 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@

class AppKernel extends Kernel
{
const VERSION = '1.7.8.6';
const VERSION = '1.7.8.7';
const MAJOR_VERSION_STRING = '1.7';
const MAJOR_VERSION = 17;
const MINOR_VERSION = 8;
const RELEASE_VERSION = 6;
const RELEASE_VERSION = 7;

/**
* {@inheritdoc}
Expand Down
12 changes: 10 additions & 2 deletions classes/Smarty/SmartyCacheResourceMysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
*/
class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom
{
/** @var PhpEncryption */
private $phpEncryption;

public function __construct()
{
$this->phpEncryption = new PhpEncryption(_NEW_COOKIE_KEY_);
}

/**
* fetch cached content and its modification time from data source.
*
Expand All @@ -39,7 +47,7 @@ protected function fetch($id, $name, $cache_id, $compile_id, &$content, &$mtime)
{
$row = Db::getInstance()->getRow('SELECT modified, content FROM ' . _DB_PREFIX_ . 'smarty_cache WHERE id_smarty_cache = "' . pSQL($id, true) . '"');
if ($row) {
$content = $row['content'];
$content = $this->phpEncryption->decrypt($row['content']);
$mtime = strtotime($row['modified']);
} else {
$content = null;
Expand Down Expand Up @@ -87,7 +95,7 @@ protected function save($id, $name, $cache_id, $compile_id, $exp_time, $content)
"' . pSQL($id, true) . '",
"' . pSQL(sha1($name)) . '",
"' . pSQL($cache_id, true) . '",
"' . pSQL($content, true) . '"
"' . $this->phpEncryption->encrypt($content) . '"
)');

return (bool) Db::getInstance()->Affected_Rows();
Expand Down
7 changes: 7 additions & 0 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ needs please refer to https://devdocs.prestashop.com/ for more information.

Release Notes for PrestaShop 1.7

####################################
# v1.7.8.7 - (2022-07-20)
####################################
- Core:
- Bug fix:
- #GHSA-hrgx-p36p-89q4: Chain: SQL Injection (CWE-89) and Eval Injection (CWE-95) (by @atomiix)

####################################
# v1.7.8.6 - (2022-05-07)
####################################
Expand Down
2 changes: 1 addition & 1 deletion install-dev/install_version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/

define('_PS_INSTALL_VERSION_', '1.7.8.6');
define('_PS_INSTALL_VERSION_', '1.7.8.7');
define('_PS_INSTALL_MINIMUM_PHP_VERSION_ID_', 70103);
define('_PS_INSTALL_MAXIMUM_PHP_VERSION_ID_', 70499);

Expand Down