{"record":{"id":"7dd0255d72fe9880","repo":"kgretzky/evilginx2","slug":"force-post-unknown-type-only-post-is-currentl","errorCode":null,"errorMessage":"force_post: unknown type - only 'post' is currently supported","messagePattern":"force_post: unknown type - only 'post' is currently supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/phishlet.go","lineNumber":703,"sourceCode":"\t\t\t\treturn err\n\t\t\t}\n\t\t\to.tp = cp.Type\n\t\t\tif o.tp == \"\" {\n\t\t\t\to.tp = \"post\"\n\t\t\t}\n\t\t\to.key_s = p.paramVal(*cp.Key)\n\t\t\tp.custom = append(p.custom, o)\n\t\t}\n\t}\n\n\tif fp.ForcePosts != nil {\n\t\tfor _, op := range *fp.ForcePosts {\n\t\t\tvar err error\n\t\t\tif op.Path == nil || *op.Path == \"\" {\n\t\t\t\treturn fmt.Errorf(\"force_post: missing or empty `path` field\")\n\t\t\t}\n\t\t\tif op.Type == nil || *op.Type != \"post\" {\n\t\t\t\treturn fmt.Errorf(\"force_post: unknown type - only 'post' is currently supported\")\n\t\t\t}\n\t\t\tif op.Force == nil || len(*op.Force) == 0 {\n\t\t\t\treturn fmt.Errorf(\"force_post: missing or empty `force` field\")\n\t\t\t}\n\n\t\t\tfpf := ForcePost{}\n\t\t\tfpf.path, err = regexp.Compile(p.paramVal(*op.Path))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tfpf.tp = *op.Type\n\n\t\t\tif op.Search != nil {\n\t\t\t\tfor _, op_s := range *op.Search {\n\t\t\t\t\tif op_s.Key == nil {\n\t\t\t\t\t\treturn fmt.Errorf(\"force_post: missing search `key` field\")\n\t\t\t\t\t}\n\t\t\t\t\tif op_s.Search == nil {","sourceCodeStart":685,"sourceCodeEnd":721,"githubUrl":"https://github.com/kgretzky/evilginx2/blob/4c0988a1d9db4d172a185e979a38bfd0efdb5830/core/phishlet.go#L685-L721","documentation":"Thrown when a `force_post` operation's `type` field is missing or set to anything other than the literal string 'post'. Currently the only supported force_post type is 'post', so the validator rejects any other value to prevent silently ineffective configurations. The value is used later as fpf.tp = *op.Type.","triggerScenarios":"Phishlet YAML has `force_post` entries with `type: get`, `type: PUT`, or no `type` key at all; validation is run via phishlet load/validate.","commonSituations":"Copying force_post syntax but writing an unsupported type; case mismatch ('Post' vs 'post'); omitting `type` because older phishlet examples or forks did not require it; schema changes between evilginx2 versions.","solutions":["Set `type: post` (lowercase, exact) on every force_post operation","Remove the wrong type or convert the logic to a supported post operation","Check the phishlet documentation for the currently supported force_post types"],"exampleFix":"# before\nforce_post:\n  - path: '/login'\n    type: get\n# after\nforce_post:\n  - path: '/login'\n    type: post","handlingStrategy":"validation","validationCode":"for i, op := range forcePosts {\n    if op.Type == nil || *op.Type != \"post\" {\n        return fmt.Errorf(\"force_post[%d]: type must be exactly \\\"post\\\", got %v\", i, op.Type)\n    }\n}","typeGuard":"func isPostType(op ForcePostOp) bool { return op.Type != nil && *op.Type == \"post\" }","tryCatchPattern":null,"preventionTips":["Only use `type: post` in force_post entries","Remember matching is case-sensitive (lowercase 'post')","Re-check the schema after upgrading evilginx2 versions","Document supported types in your phishlet templates"],"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-12T22:17:10.623Z"}