From bd28441613745d101924f00e5f20b2c2441e51e2 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Mon, 27 Feb 2023 12:27:19 +0100 Subject: [PATCH] add session id patch --- README.md | 29 +++++++++++++++++++++++++++++ sessionid.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 README.md create mode 100644 sessionid.patch diff --git a/README.md b/README.md new file mode 100644 index 0000000..2387f75 --- /dev/null +++ b/README.md @@ -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! diff --git a/sessionid.patch b/sessionid.patch new file mode 100644 index 0000000..c45f85e --- /dev/null +++ b/sessionid.patch @@ -0,0 +1,26 @@ +From 3076f4f5dcfde2118afe2674af94c27dbbe03152 Mon Sep 17 00:00:00 2001 +From: Daniel Seifert +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 +