sanitize navbar color

This commit is contained in:
Yuri Kuznetsov
2025-03-19 09:33:35 +02:00
parent 398743fe63
commit cbcc560bd3
+7
View File
@@ -1286,6 +1286,13 @@ class NavbarSiteView extends View {
color = this.getMetadata().get(['clientDefs', tab, 'color']);
}
if (
color &&
!/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(color)
) {
color = null;
}
if (!params.tabIconsDisabled && !isGroup && !isDivider && !isUrl) {
iconClass = this.getMetadata().get(['clientDefs', tab, 'iconClass'])
}