mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-27 05:08:11 +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 {
|
func ValidateNewSettings(req models.ServerSettings) bool {
|
||||||
// TODO: add checks for different fields
|
// TODO: add checks for different fields
|
||||||
|
if req.JwtValidityDuration > 525600 || req.JwtValidityDuration < 5 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user