add d3SidCookieFix branch
This commit is contained in:
bovenliggende
29d2633808
commit
0f3bdd9ce1
36
copy_this/modules/d3/d3sidcookiefix/metadata.php
Normal file
36
copy_this/modules/d3/d3sidcookiefix/metadata.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* Metadata version
|
||||
*/
|
||||
$sMetadataVersion = '1.1';
|
||||
|
||||
/**
|
||||
* Module information
|
||||
*/
|
||||
$aModule = array(
|
||||
'id' => 'd3sidcookiefix',
|
||||
'title' =>
|
||||
(class_exists('d3utils') ? d3utils::getInstance()->getD3Logo() : 'D³') .
|
||||
' 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³ 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(
|
||||
),
|
||||
);
|
@ -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 © 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
16
setup+doku/installation.txt
Normal file
16
setup+doku/installation.txt
Normal file
@ -0,0 +1,16 @@
|
||||
Dieses Bugfix verhindert das mehrfache Setzen des Session-ID-Cookies und der damit
|
||||
verbundenden Vergrößerung der Headerzeilen jeder geladenen Ressource.
|
||||
|
||||
Dies führt bei manchen LoadBalancer-Konfigurationen zu Verbindungsabbrü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ährleistung
|
||||
zur Verfü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".
|
Laden…
Verwijs in nieuw issue
Block a user