v2.0.0.0 - oxid6

This commit is contained in:
SusiKober 2017-11-21 09:50:04 +01:00 gecommit door Daniel Seifert
bovenliggende 0f3bdd9ce1
commit 93975f532b
Getekend door: DanielS
GPG sleutel-ID: 8A7C4C6ED1915C6F
4 gewijzigde bestanden met toevoegingen van 83 en 85 verwijderingen

Bestand weergeven

@ -1,36 +0,0 @@
<?php
/**
* Metadata version
*/
$sMetadataVersion = '1.1';
/**
* Module information
*/
$aModule = array(
'id' => 'd3sidcookiefix',
'title' =>
(class_exists('d3utils') ? d3utils::getInstance()->getD3Logo() : 'D&sup3;') .
' Session ID Cookie fix',
'description' => array(
'de' => 'fix multiple session cookie header lines - causes "Connection reset by peer" errors in some load balancer configurations because of to long headers',
'en' => ''),
// 'thumbnail' => 'picture.png',
'version' => '1.0.0.0',
'author' => 'D&sup3; Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'http://www.oxidmodule.com/',
'extend' => array(
'oxsession' => 'd3/d3sidcookiefix/modules/core/d3_sidcookiefix_oxsession',
),
'files' => array(
),
'templates' => array(
),
'events' => array(
),
'blocks' => array(
),
'settings' => array(
),
);

Bestand weergeven

@ -0,0 +1,34 @@
<?php
/**
* Metadata version
*/
$sMetadataVersion = '1.1';
$sD3Logo = (class_exists(d3\modcfg\Application\Model\d3utils::class) ? d3\modcfg\Application\Model\d3utils::getInstance()->getD3Logo() : 'D&sup3;');
/**
* Module information
*/
$aModule = array(
'id' => 'd3sidcookiefix',
'title' => $sD3Logo . ' Session ID Cookie fix',
'description' => array(
'de' => '<ul><li>fix multiple session cookie header lines </li>'
.'<li>causes "Connection reset by peer" errors </li>'
.'<li>error occur in some load balancer configurations because of to long headers</li></ul>',
'en' => ''
),
'thumbnail' => 'picture.png',
'version' => '2.0.0.0',
'author' => 'D&sup3; Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'http://www.oxidmodule.com/',
'extend' => array(
OxidEsales\Eshop\Core\Session::class => 'd3/sidcookiefix/modules/core/d3_sidcookiefix_oxsession',
),
'files' => array(),
'templates' => array(),
'events' => array(),
'blocks' => array(),
'settings' => array(),
);

Bestand weergeven

@ -1,50 +1,50 @@
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright © Data Development, Thomas Dartsch
* @author Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_sidcookiefix_oxsession extends d3_sidcookiefix_oxsession_parent
{
protected function _setSessionId($sSessId)
{
//marking this session as new one, as it might be not writen to db yet
if ($sSessId && session_id() != $sSessId) {
$this->_blNewSession = true;
}
session_id($sSessId);
$this->setId($sSessId);
$blUseCookies = $this->_getSessionUseCookies();
if (!$this->_allowSessionStart()) {
if ($blUseCookies) {
oxRegistry::get("oxUtilsServer")->setOxCookie($this->getName(), null);
}
return;
}
if ($blUseCookies) {
// D3: check for set SessionCookie
$sCookieSessid = oxRegistry::get("oxUtilsServer")->getOxCookie($this->getName());
if (!$sCookieSessid || $sSessId != $sCookieSessid) {
//setting session cookie
oxRegistry::get("oxUtilsServer")->setOxCookie($this->getName(), $sSessId);
}
}
}
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright © Data Development, Thomas Dartsch
* @author Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_sidcookiefix_oxsession extends d3_sidcookiefix_oxsession_parent
{
protected function _setSessionId($sSessId)
{
//marking this session as new one, as it might be not writen to db yet
if ($sSessId && session_id() != $sSessId) {
$this->_blNewSession = true;
}
session_id($sSessId);
$this->setId($sSessId);
$blUseCookies = $this->_getSessionUseCookies();
if (!$this->_allowSessionStart()) {
if ($blUseCookies) {
oxRegistry::get("oxUtilsServer")->setOxCookie($this->getName(), null);
}
return;
}
if ($blUseCookies) {
// D3: check for set SessionCookie
$sCookieSessid = oxRegistry::get("oxUtilsServer")->getOxCookie($this->getName());
if (!$sCookieSessid || $sSessId != $sCookieSessid) {
//setting session cookie
oxRegistry::get("oxUtilsServer")->setOxCookie($this->getName(), $sSessId);
}
}
}
}

Binair bestand niet weergegeven.

Na

Breedte:  |  Hoogte:  |  Grootte: 15 KiB