mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 01:18:42 +00:00
feat: validate key length
This commit is contained in:
parent
7b2c25270a
commit
55a4c783e9
1 changed files with 4 additions and 0 deletions
|
|
@ -508,6 +508,10 @@ the way that the Fleet server works.
|
|||
cancel()
|
||||
}
|
||||
|
||||
if len(config.Server.PrivateKey) > 0 && len([]byte(config.Server.PrivateKey)) != 32 {
|
||||
initFatal(errors.New("private key must be 32 bytes long"), "validate private key")
|
||||
}
|
||||
|
||||
appCfg, err := ds.AppConfig(context.Background())
|
||||
if err != nil {
|
||||
initFatal(err, "loading app config")
|
||||
|
|
|
|||
Loading…
Reference in a new issue