summaryrefslogtreecommitdiff
path: root/htdocs/sass.php
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs/sass.php')
-rw-r--r--htdocs/sass.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/htdocs/sass.php b/htdocs/sass.php
index eb24962..186b706 100644
--- a/htdocs/sass.php
+++ b/htdocs/sass.php
@@ -4,7 +4,14 @@ require __DIR__.'/../init.php';
global $config;
$name = $_REQUEST['name'] ?? '';
-if (!$config['is_dev'] || !$name || !file_exists($path = ROOT.'/htdocs/scss/'.$name.'.scss')) {
+$theme = $_REQUEST['theme'] ?? '';
+
+if ($theme != 'light' && $theme != 'dark') {
+ http_response_code(403);
+ exit;
+}
+
+if (!$config['is_dev'] || !$name || !file_exists($path = ROOT.'/htdocs/scss/entries/'.$name.'/'.$theme.'.scss')) {
// logError(__FILE__.': access denied');
http_response_code(403);
exit;