Skip to content

Commit 7b7f68d

Browse files
committed
Avoid setting an explicit session ID via GET args.
This is considered a failing metric in automated PCI scans under the "session hijacking" category and thus should be avoided. PHP 4.3 introduced the "session.use_only_cookies" PHP configuration option which meant that passing in a session ID via GET/POST variables can be disabled. The code in Joomla should at very least honour this setting. Alternatively, if no good reason for this code exists, it should be removed entirely.
1 parent e11bd13 commit 7b7f68d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/src/Session/Storage/JoomlaStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public function start(): void
283283
// Get the cookie object
284284
$cookie = $this->input->cookie;
285285

286-
if (\is_null($cookie->get($session_name))) {
286+
if (empty(\ini_get('session.use_only_cookies')) && \is_null($cookie->get($session_name))) {
287287
$session_clean = $this->input->getString($session_name);
288288

289289
if ($session_clean) {

0 commit comments

Comments
 (0)