mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-26 21:01:32 +08:00
fix: add validation for JWT validity duration in new settings (#3564)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user