diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-07 17:58:28 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-07 17:58:28 +0900 |
| commit | 2489766efe7b94873a04339009c3609c55e3856f (patch) | |
| tree | 35d186f02e65b52bb9f0d49e34f7cda981c03ec4 /internal | |
| parent | 9e48d7f5626aa966a23754534f3120855d6a7c32 (diff) | |
hst/config: identity bounds check early
This makes sense to do here instead of in internal/app.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/app/finalise.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/internal/app/finalise.go b/internal/app/finalise.go index 55554eb4..2fa4ca07 100644 --- a/internal/app/finalise.go +++ b/internal/app/finalise.go @@ -79,11 +79,6 @@ func (k *outcome) finalise(ctx context.Context, msg container.Msg, id *state.ID, k.ct = ct } - // this is checked again in hsu - if config.Identity < hst.IdentityMin || config.Identity > hst.IdentityMax { - return newWithMessage(fmt.Sprintf("identity %d out of range", config.Identity)) - } - kp.supp = make([]string, len(config.Groups)) for i, name := range config.Groups { if gid, err := k.lookupGroupId(name); err != nil { @@ -98,7 +93,7 @@ func (k *outcome) finalise(ctx context.Context, msg container.Msg, id *state.ID, } } - // validation complete at this point + // early validation complete at this point s := outcomeState{ ID: id, Identity: config.Identity, |
