Merge pull request #1107 from shreesh-webkul/gli-2017

Fixed: Cookie not saving in browser when '+', '&', ')', '(' characters exists in Base URL
This commit is contained in:
Rohit Jain
2024-07-04 19:56:18 +05:30
committed by GitHub

View File

@@ -89,8 +89,9 @@ class CookieCore
$this->_path = '/'.$this->_path;
}
$this->_path = rawurlencode($this->_path);
$this->_path = str_replace('%2F', '/', $this->_path);
$this->_path = str_replace('%7E', '~', $this->_path);
$search = array('%2F', '%7E', '%28', '%29', '%2B', '%26');
$replace = array('/', '~', '(', ')', '+', '&');
$this->_path = str_replace($search, $replace, $this->_path);
$this->_domain = $this->getDomain($shared_urls);
$this->_sameSite = Configuration::get('PS_COOKIE_SAMESITE');
$this->_name = 'QloApps-'.md5(($this->_standalone ? '' : _PS_VERSION_).$name.$this->_domain);