{"record":{"id":"f1b02321a4e997f2","repo":"kgretzky/evilginx2","slug":"missing-custom-parameter-values-during-initalizati","errorCode":null,"errorMessage":"missing custom parameter values during initalization: %v","messagePattern":"missing custom parameter values during initalization: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/phishlet.go","lineNumber":350,"sourceCode":"\t\t\t\tpall[param.Name] = val\n\n\t\t\t\tif param.Required != nil && *param.Required == true {\n\t\t\t\t\tprequired[param.Name] = val\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor k, v := range *customParams {\n\t\t\t\tif _, ok := pall[k]; !ok {\n\t\t\t\t\tlog.Warning(\"phishlets: [%s] incorrect parameter key specified: %s\", site, k)\n\t\t\t\t\tdelete(*customParams, k)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tparams[k] = v\n\t\t\t\tif _, ok := prequired[k]; ok {\n\t\t\t\t\tdelete(prequired, k)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif len(prequired) > 0 {\n\t\t\t\treturn fmt.Errorf(\"missing custom parameter values during initalization: %v\", prequired)\n\t\t\t}\n\t\t\tp.isTemplate = false\n\t\t\tp.customParams = params\n\t\t} else {\n\t\t\tfor _, param := range *fp.Params {\n\t\t\t\tval := \"\"\n\t\t\t\tif param.Required != nil && *param.Required {\n\t\t\t\t\tval += \"(required)\"\n\t\t\t\t} else if param.Default != nil {\n\t\t\t\t\tval = *param.Default\n\t\t\t\t}\n\n\t\t\t\tp.customParams[param.Name] = val\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t\tif customParams != nil {","sourceCodeStart":332,"sourceCodeEnd":368,"githubUrl":"https://github.com/kgretzky/evilginx2/blob/4c0988a1d9db4d172a185e979a38bfd0efdb5830/core/phishlet.go#L332-L368","documentation":"When a phishlet is a template (defines a `params` section), required custom parameters must be supplied at load/init time. Any required parameter not provided remains in the prequired map, and the loader fails with this error listing the missing parameter names (note the 'initalization' typo is from the source). It ensures template phishlets are fully instantiated before use.","triggerScenarios":"Loading a parametrized phishlet via LoadPhishlet(..., params) where the supplied params map omits one or more parameters declared with `required: true` in the phishlet's `params` section — e.g. missing `domain` or `subdomain` params needed to expand `{domain}` placeholders.","commonSituations":"Activating a template phishlet with `phishlet set`/`activate` without filling all required custom params, copying a phishlet that expects domain parameters but providing only some, or a typo in the parameter name so it doesn't match the required key.","solutions":["Provide values for every listed required parameter when loading/activating the phishlet (names are printed in the error)","Check the phishlet's `params` section for required: true entries and their exact names","Fix parameter-name typos — keys must match exactly","Set defaults in the phishlet's params section if the parameter is optional in practice"],"exampleFix":"// before\npl, err := cfg.LoadPhishlet(name, path, map[string]string{\"domain\": \"example.com\"})\n// after (supply all required params, e.g. also 'sub')\npl, err := cfg.LoadPhishlet(name, path, map[string]string{\"domain\": \"example.com\", \"sub\": \"login\"})","handlingStrategy":"validation","validationCode":"// verify all required params before LoadPhishlet\nfor _, param := range phishletYAML.Params {\n    if param.Required {\n        if _, ok := supplied[param.Name]; !ok {\n            return fmt.Errorf(\"missing required param: %s\", param.Name)\n        }\n    }\n}","typeGuard":"func hasRequiredParams(required []string, supplied map[string]string) bool {\n    for _, r := range required {\n        if _, ok := supplied[r]; !ok {\n            return false\n        }\n    }\n    return true\n}","tryCatchPattern":"if err := cfg.LoadPhishlet(name, path, params); err != nil {\n    if strings.Contains(err.Error(), \"missing custom parameter\") {\n        log.Error(\"provide all required template params: %v\", err)\n    }\n}","preventionTips":["Read the phishlet's params section and fill every required: true entry","Match parameter names exactly — typos silently leave the required key unfilled","Keep a per-deployment params file so activation is repeatable","Use the error output itself: it lists exactly which params are missing"],"tags":["phishlet","configuration","missing-parameter","template"],"backgroundTag":"missing-required-argument","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"}