summaryrefslogtreecommitdiffstats
path: root/apps/theming/lib/Command/UpdateConfig.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/theming/lib/Command/UpdateConfig.php')
-rw-r--r--apps/theming/lib/Command/UpdateConfig.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/theming/lib/Command/UpdateConfig.php b/apps/theming/lib/Command/UpdateConfig.php
index 3d5840fadd9..1ff75b5ba70 100644
--- a/apps/theming/lib/Command/UpdateConfig.php
+++ b/apps/theming/lib/Command/UpdateConfig.php
@@ -127,6 +127,11 @@ class UpdateConfig extends Command {
$key = $key . 'Mime';
}
+ if ($key === 'color' && !preg_match('/^\#([0-9a-f]{3}|[0-9a-f]{6})$/i', $value)) {
+ $output->writeln('<error>The given color is invalid: ' . $value . '</error>');
+ return 1;
+ }
+
$this->themingDefaults->set($key, $value);
$output->writeln('<info>Updated ' . $key . ' to ' . $value . '</info>');