Skip to content
Snippets Groups Projects
Commit c32e2ed5 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Bugfix: replace /dev/null with system tmp-dir

parent d02e8866
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,8 @@ $config = [
/*
* The following settings are *filesystem paths* which define where
* SimpleSAMLphp can find or write the following things:
* - 'loggingdir': Where to write logs.
* - 'loggingdir': Where to write logs. MUST be set to NULL when using a logging
* handler other than `file`.
* - 'datadir': Storage of general data.
* - 'tempdir': Saving temporary files. SimpleSAMLphp will attempt to create
* this directory if it doesn't exist.
......@@ -323,7 +324,6 @@ $config = [
*/
/**************************
| LOGGING AND STATISTICS |
**************************/
......@@ -359,7 +359,7 @@ $config = [
*
* - %level: the log level (name or number depending on the handler used).
*
* - %stat: if the log entry is intended for statistical purposes, it will print the string 'STAT ' (bear in mind
- * - %stat: if the log entry is intended for statistical purposes, it will print the string 'STAT ' (bear in mind
* the trailing space).
*
* - %trackid: the track ID, an identifier that allows you to track a single session.
......
......@@ -16,6 +16,10 @@ use Symfony\Component\DependencyInjection\Loader\DirectoryLoader;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
use function getenv;
use function is_dir;
use function sys_get_temp_dir;
/**
* A class to create the container and handle a given request.
*/
......@@ -67,12 +71,7 @@ class Kernel extends BaseKernel
{
$configuration = Configuration::getInstance();
$handler = $configuration->getString('logging.handler');
if ($handler === 'file') {
$loggingPath = $configuration->getString('loggingdir');
} else {
$loggingPath = '/dev/null';
}
$loggingPath = $configuration->getString('loggingdir', sys_get_temp_dir());
$sysUtils = new System();
if ($sysUtils->isAbsolutePath($loggingPath)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment