From: rabuzarus <> Date: Tue, 24 Oct 2017 12:44:31 +0000 (+0200) Subject: frio: sanitize $schema only if the variable is initialized X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=578dc6f9672ca81a21ff70363cb16fb7cd0aca7c;p=friendica.git frio: sanitize $schema only if the variable is initialized --- diff --git a/view/theme/frio/style.php b/view/theme/frio/style.php index c227c354f8..04379b244e 100644 --- a/view/theme/frio/style.php +++ b/view/theme/frio/style.php @@ -61,7 +61,9 @@ if ($_REQUEST['schema']) { $schema = $_REQUEST['schema']; } -$schema = basename($schema); +// Sanitize the data. +$schema = !empty($schema) ? basename($schema) : ""; + if (($schema) && ($schema != '---')) { if (file_exists('view/theme/frio/schema/' . $schema . '.php')) { @@ -96,7 +98,7 @@ $bgcolor = (empty($bgcolor) ? "#ededed" : $bgcolor); $background_image = (empty($background_image) ? 'img/none.jpg' : $background_image); $modified = (empty($modified) ? time() :$modified); -$contentbg_transp = ((isset($contentbg_transp) && $contentbg_transp != "") ? $contentbg_transp : 100); +$contentbg_transp = ((isset($contentbg_transp) && $contentbg_transp != "") ? $contentbg_transp : 100); // Calculate some colors in dependance of existing colors. // Some colors are calculated to don't have too many selection