fix: add validation for JWT validity duration in new settings (#3564)

This commit is contained in:
Aceix
2025-07-27 03:10:51 +00:00
committed by GitHub
parent 6367efc882
commit 755a390003

View File

@@ -46,6 +46,9 @@ func UpsertServerSettings(s models.ServerSettings) error {
func ValidateNewSettings(req models.ServerSettings) bool {
// TODO: add checks for different fields
if req.JwtValidityDuration > 525600 || req.JwtValidityDuration < 5 {
return false
}
return true
}