Skip to content

Commit 53feabd

Browse files
colingHackwarrichard67laoneo
authored
Avoid setting an explicit session ID via GET args. (joomla#43451)
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. Co-authored-by: Hannes Papenberg <[email protected]> Co-authored-by: Richard Fath <[email protected]> Co-authored-by: Allon Moritz <[email protected]>
1 parent 262877b commit 53feabd

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
@@ -301,7 +301,7 @@ public function start(): void
301301
// Get the cookie object
302302
$cookie = $this->input->cookie;
303303

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

307307
if ($session_clean) {

0 commit comments

Comments
 (0)