add session id patch

This commit is contained in:
Daniel Seifert 2023-02-27 12:27:19 +01:00
commit bd28441613
Signed by: DanielS
GPG Key ID: 8A7C4C6ED1915C6F
2 changed files with 55 additions and 0 deletions

29
README.md Normal file
View File

@ -0,0 +1,29 @@
# session id patch
applicable for OXID 6.2 to 6.5.1
## first install the composer patch package
```
composer require cweagans/composer-patches
```
## add this to your main composer file
```
"extra": {
"patches": {
"oxid-esales/oxideshop-ce": {
"sessionid fix":
"https://git.d3data.de/D3Public/oxid_patches/raw/branch/sessionid/sessionid.patch"
}
},
"enable-patching": true
},
```
## run this command
```
rm -rf ./vendor/oxid-esales/oxideshop-ce
composer install
```
Enjoy!

26
sessionid.patch Normal file
View File

@ -0,0 +1,26 @@
From 3076f4f5dcfde2118afe2674af94c27dbbe03152 Mon Sep 17 00:00:00 2001
From: Daniel Seifert <ds@shopmodule.com>
Date: Mon, 27 Feb 2023 12:14:11 +0100
Subject: [PATCH 1/1] force unset existing session when new session is
initialised
---
source/Core/Session.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/Core/Session.php b/source/Core/Session.php
index 29ec34762..91cad53db 100644
--- a/source/Core/Session.php
+++ b/source/Core/Session.php
@@ -370,7 +370,7 @@ class Session extends \OxidEsales\Eshop\Core\Base
}
}
- $sessionId = $this->_getNewSessionId(false);
+ $sessionId = $this->_getNewSessionId();
$this->setId($sessionId);
$this->setSessionCookie($sessionId);
--
2.26.1.windows.1