add d3SidCookieFix branch

This commit is contained in:
2017-04-25 10:18:56 +02:00
bovenliggende 29d2633808
commit 0f3bdd9ce1
3 gewijzigde bestanden met toevoegingen van 102 en 0 verwijderingen

Bestand weergeven

@ -0,0 +1,36 @@
<?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,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 <20> D<> Data Development, Thomas Dartsch
* @author D<> 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);
}
}
}
}

Bestand weergeven

@ -0,0 +1,16 @@
Dieses Bugfix verhindert das mehrfache Setzen des Session-ID-Cookies und der damit
verbundenden Vergr<67><72>erung der Headerzeilen jeder geladenen Ressource.
Dies f<>hrt bei manchen LoadBalancer-Konfigurationen zu Verbindungsabbr<62>chen.
Bitte beachten Sie: Eingriffe in das Session- und Cookie-Handling k<>nnen tiefgreifende
Auswirkungen auf den Shopbetrieb haben. Wir stellen diese Erweiterung ohne Gew<65>hrleistung
zur Verf<72>gung. Testen Sie dies vor einem produktiven Einsatz unbedingt umfangreich. Der
Einsatz dieses Moduls erfolgt auf eigenes Risiko.
Dieses Modul ist einsetzbar im OXID eShop ab Version 4.3.2 bis 4.10.3 / 5.3.3. Davon
abweichende Shopversionen wurden damit nicht kontrolliert.
Kopieren Sie den Inhalt des "copy_this"-Ordners in den Root-Ordner Ihres Shops.
Aktivieren Sie das Modul "D3 Session ID Cookie fix" im Adminbereich unter "Erweiterungen ->
Module".