Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Henderson <sthen@users.noreply.github.com>2022-09-24 10:10:18 +0300
committerGitHub <noreply@github.com>2022-09-24 10:10:18 +0300
commitba5ea75f4609ae8587620b7ac750e6e231a0eac9 (patch)
tree24cf089636c21bf847c609a4dfb1e850c63b7cc5
parent704034be2dc09fb4a3971dddc838547eac5f6000 (diff)
Don't return undefined $_SESSION['secure_token'] (#8705)
Avoid `PHP Warning: Undefined array key "secure_token" in /roundcubemail/program/lib/Roundcube/rcube.php on line 1002` seen with PHP 8 and secure_urls enabled.
-rw-r--r--program/lib/Roundcube/rcube.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php
index dfdffc9af..31fba2eeb 100644
--- a/program/lib/Roundcube/rcube.php
+++ b/program/lib/Roundcube/rcube.php
@@ -996,7 +996,9 @@ class rcube
$_SESSION['secure_token'] = $plugin['value'];
}
- return $_SESSION['secure_token'];
+ if (!empty($_SESSION['secure_token'])) {
+ return $_SESSION['secure_token'];
+ }
}
return false;