kgretzky/evilginx2 · error
force_post: missing force `value` field
Error message
force_post: missing force `value` field
What it means
Thrown when an entry inside a force_post `force` list lacks the `value` field. Each force item needs both `key` (parameter to replace) and `value` (replacement string, with {param} placeholders resolved via p.paramVal); a missing value leaves nothing to substitute, so validation fails.
Source
Thrown at core/phishlet.go:742
f_s := ForcePostSearch{}
f_s.key, err = regexp.Compile(p.paramVal(*op_s.Key))
if err != nil {
return err
}
f_s.search, err = regexp.Compile(p.paramVal(*op_s.Search))
if err != nil {
return err
}
fpf.search = append(fpf.search, f_s)
}
}
for _, op_f := range *op.Force {
if op_f.Key == nil {
return fmt.Errorf("force_post: missing force `key` field")
}
if op_f.Value == nil {
return fmt.Errorf("force_post: missing force `value` field")
}
f_f := ForcePostForce{
key: p.paramVal(*op_f.Key),
value: p.paramVal(*op_f.Value),
}
fpf.force = append(fpf.force, f_f)
}
p.forcePost = append(p.forcePost, fpf)
}
}
if fp.LandingPath != nil {
p.landing_path = *fp.LandingPath
for n := range p.landing_path {
p.landing_path[n] = p.paramVal(p.landing_path[n])
}
}View on GitHub (pinned to 4c0988a1d9)
Solutions
- Add `value:` to every force_post force item
- Use valid placeholders like {password} or {username} in the value
- Fix field-name typos and ensure the value is not null/commented out
Example fix
# before
force:
- key: 'password'
# after
force:
- key: 'password'
value: '{password}' Defensive patterns
Strategy: validation
Validate before calling
for _, op := range forcePosts {
if op.Force == nil { continue }
for j, f := range *op.Force {
if f.Value == nil || strings.TrimSpace(*f.Value) == "" {
return fmt.Errorf("force_post force[%d]: `value` is required", j)
}
}
} Type guard
func forceHasValue(f ForcePostForceCfg) bool { return f.Value != nil } Prevention
- Never leave a force item's value empty or commented out
- Quote values containing YAML-special characters
- Use valid {placeholder} tokens in values
- Validate the phishlet right after template edits
When it happens
Trigger: Phishlet YAML force_post `force:` items where `key:` exists but `value:` is absent or null; phishlet validation at load time.
Common situations: Forgetting to fill in the replacement value in a template phishlet; value accidentally commented out; YAML unquoting issues that turn the value into null; typos like `val:` instead of `value:`.
Related errors
- force_post: missing or empty `path` field
- force_post: unknown type - only 'post' is currently supporte
- force_post: missing or empty `force` field
- force_post: missing search `key` field
- force_post: missing search `search` field
AI-assisted analysis of kgretzky/evilginx2@4c0988a1d9 (2026-09-05).
Data as JSON: /api/errors/b8756876c382005d.
Report an issue: GitHub.