aboutsummaryrefslogtreecommitdiff
path: root/internal/validator/user.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <f@miniflux.net> 2024-10-05 20:37:30 -0700
committerGravatar Frédéric Guillot <f@miniflux.net> 2024-10-05 21:21:12 -0700
commite555e442fba0a9ca3c8cf67444e8c42f79db359a (patch)
treee7ee91ff4842ef23569833e0443be91545d4c42e /internal/validator/user.go
parent600dea6ce54989a792e666a0a26de0ee847e4562 (diff)
downloadv2-e555e442fba0a9ca3c8cf67444e8c42f79db359a.tar.gz
v2-e555e442fba0a9ca3c8cf67444e8c42f79db359a.tar.zst
v2-e555e442fba0a9ca3c8cf67444e8c42f79db359a.zip
feat: add new settings option to allow external fonts
Diffstat (limited to 'internal/validator/user.go')
-rw-r--r--internal/validator/user.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/validator/user.go b/internal/validator/user.go
index 2365ee61..2e79785b 100644
--- a/internal/validator/user.go
+++ b/internal/validator/user.go
@@ -123,6 +123,12 @@ func ValidateUserModification(store *storage.Storage, userID int64, changes *mod
}
}
+ if changes.ExternalFontHosts != nil {
+ if !IsValidDomainList(*changes.ExternalFontHosts) {
+ return locale.NewLocalizedError("error.settings_invalid_domain_list")
+ }
+ }
+
return nil
}