]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/style.php
Merge pull request #7060 from annando/ap-connect
[friendica.git] / view / theme / frio / style.php
index 5fada9dd4802dc51d0e19aa17aebdbf6e4deea46..6a8aaf2c2819fcd06e1e292573c4b1934b421be1 100644 (file)
@@ -5,9 +5,11 @@
 
 use Friendica\Core\Config;
 use Friendica\Core\PConfig;
+use Friendica\Util\Strings;
 
 require_once 'view/theme/frio/php/PHPColors/Color.php';
 
+$scheme = '';
 $schemecss = '';
 $schemecssfile = false;
 $scheme_modified = 0;
@@ -67,9 +69,7 @@ if (!empty($_REQUEST['scheme'])) {
        $scheme = $_REQUEST['scheme'];
 }
 
-// Sanitize the data.
-$scheme = !empty($scheme) ? basename($scheme) : '';
-
+$scheme = Strings::sanitizeFilePathItem($scheme);
 
 if (($scheme) && ($scheme != '---')) {
        if (file_exists('view/theme/frio/scheme/' . $scheme . '.php')) {