diff options
author | Jaime Perez Crespo <jaime.perez@uninett.no> | 2016-05-20 13:51:35 +0200 |
---|---|---|
committer | Jaime Perez Crespo <jaime.perez@uninett.no> | 2016-05-20 13:51:35 +0200 |
commit | 8d57e8b0966930d002613227ac4ba24aed128cd6 (patch) | |
tree | c45f02a2bd5770a14de48efdd8d05f8cab3af9ba /lib/SimpleSAML | |
parent | 0988ceb75de67a5912b789da38a78c38532e871f (diff) | |
download | simplesamlphp-8d57e8b0966930d002613227ac4ba24aed128cd6.zip simplesamlphp-8d57e8b0966930d002613227ac4ba24aed128cd6.tar.gz simplesamlphp-8d57e8b0966930d002613227ac4ba24aed128cd6.tar.bz2 |
Fix an issue with the SimpleSAML\Logger class that was still trying to fetch the track ID from the session when running from the command line, where there's obviously no session at all.
Diffstat (limited to 'lib/SimpleSAML')
-rw-r--r-- | lib/SimpleSAML/Logger.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/SimpleSAML/Logger.php b/lib/SimpleSAML/Logger.php index c5f433e..9c408e6 100644 --- a/lib/SimpleSAML/Logger.php +++ b/lib/SimpleSAML/Logger.php @@ -399,6 +399,9 @@ class Logger self::createLoggingHandler('SimpleSAML\Logger\StandardErrorLoggingHandler'); } $_SERVER['REMOTE_ADDR'] = "CLI"; + if (self::$trackid == self::NO_TRACKID) { + self::$trackid = 'CL'.bin2hex(openssl_random_pseudo_bytes(4)); + } } elseif (self::$loggingHandler === null) { // Initialize logging self::createLoggingHandler(); |