{"record":{"id":"b8756876c382005d","repo":"kgretzky/evilginx2","slug":"force-post-missing-force-value-field","errorCode":null,"errorMessage":"force_post: missing force `value` field","messagePattern":"force_post: missing force `value` field","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/phishlet.go","lineNumber":742,"sourceCode":"\n\t\t\t\t\tf_s := ForcePostSearch{}\n\t\t\t\t\tf_s.key, err = regexp.Compile(p.paramVal(*op_s.Key))\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\tf_s.search, err = regexp.Compile(p.paramVal(*op_s.Search))\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\tfpf.search = append(fpf.search, f_s)\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor _, op_f := range *op.Force {\n\t\t\t\tif op_f.Key == nil {\n\t\t\t\t\treturn fmt.Errorf(\"force_post: missing force `key` field\")\n\t\t\t\t}\n\t\t\t\tif op_f.Value == nil {\n\t\t\t\t\treturn fmt.Errorf(\"force_post: missing force `value` field\")\n\t\t\t\t}\n\n\t\t\t\tf_f := ForcePostForce{\n\t\t\t\t\tkey:   p.paramVal(*op_f.Key),\n\t\t\t\t\tvalue: p.paramVal(*op_f.Value),\n\t\t\t\t}\n\t\t\t\tfpf.force = append(fpf.force, f_f)\n\t\t\t}\n\t\t\tp.forcePost = append(p.forcePost, fpf)\n\t\t}\n\t}\n\n\tif fp.LandingPath != nil {\n\t\tp.landing_path = *fp.LandingPath\n\t\tfor n := range p.landing_path {\n\t\t\tp.landing_path[n] = p.paramVal(p.landing_path[n])\n\t\t}\n\t}","sourceCodeStart":724,"sourceCodeEnd":760,"githubUrl":"https://github.com/kgretzky/evilginx2/blob/4c0988a1d9db4d172a185e979a38bfd0efdb5830/core/phishlet.go#L724-L760","documentation":"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.","triggerScenarios":"Phishlet YAML force_post `force:` items where `key:` exists but `value:` is absent or null; phishlet validation at load time.","commonSituations":"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:`.","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"],"exampleFix":"# before\nforce:\n  - key: 'password'\n# after\nforce:\n  - key: 'password'\n    value: '{password}'","handlingStrategy":"validation","validationCode":"for _, op := range forcePosts {\n    if op.Force == nil { continue }\n    for j, f := range *op.Force {\n        if f.Value == nil || strings.TrimSpace(*f.Value) == \"\" {\n            return fmt.Errorf(\"force_post force[%d]: `value` is required\", j)\n        }\n    }\n}","typeGuard":"func forceHasValue(f ForcePostForceCfg) bool { return f.Value != nil }","tryCatchPattern":null,"preventionTips":["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"],"tags":["phishlet","config-validation","force-post"],"backgroundTag":"phishlet-config-validation","analyzedSha":"4c0988a1d9db4d172a185e979a38bfd0efdb5830","analyzedAt":"2026-09-05T19:23:07.238Z","contentChangedAt":"2026-09-05T19:23:07.238Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}