{"record":{"id":"3a302796214ee8f7","repo":"juanfont/headscale","slug":"s-confirm-form-no-action-attribute","errorCode":null,"errorMessage":"%s confirm form: no action attribute","messagePattern":"(.+?) confirm form: no action attribute","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"integration/scenario.go","lineNumber":1256,"sourceCode":"\t}\n\n\treturn body, redirectURL, nil\n}\n\n// submitConfirmForm parses the OIDC registration confirmation\n// interstitial HTML, extracts the form action and CSRF token, and\n// POSTs the form using the same HTTP client (which carries the CSRF\n// cookie set by the callback).\nfunc submitConfirmForm(\n\thostname string,\n\thtmlBody string,\n\tprevResp *http.Response,\n\thc *http.Client,\n) (string, *url.URL, error) {\n\t// Extract form action URL.\n\tactionIdx := strings.Index(htmlBody, `action=\"`)\n\tif actionIdx == -1 {\n\t\treturn \"\", nil, fmt.Errorf(\"%s confirm form: no action attribute\", hostname) //nolint:err113\n\t}\n\n\tactionStart := actionIdx + len(`action=\"`)\n\n\tactionEnd := strings.Index(htmlBody[actionStart:], `\"`)\n\tif actionEnd == -1 {\n\t\treturn \"\", nil, fmt.Errorf(\"%s confirm form: unterminated action attribute\", hostname) //nolint:err113\n\t}\n\n\tformAction := htmlBody[actionStart : actionStart+actionEnd]\n\n\t// Extract hidden CSRF input value. The rendered <input> has\n\t// attributes in name-type-value order so we grab the whole tag.\n\tbefore, _, ok := strings.Cut(htmlBody, `name=\"headscale_register_confirm\"`)\n\tif !ok {\n\t\treturn \"\", nil, fmt.Errorf(\"%s confirm form: no CSRF input\", hostname) //nolint:err113\n\t}\n","sourceCodeStart":1238,"sourceCodeEnd":1274,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/integration/scenario.go#L1238-L1274","documentation":"Error \"%s confirm form: no action attribute\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at integration/scenario.go:1256 when the library encounters an invalid state.","commonSituations":"The confirm page form had no action attribute. The mock OIDC provider's confirm template may have changed; check the page HTML.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (confirm form); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (confirm form); retry the operation after fixing the input, configuration, or environment.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"565fd254d06c4c7f9a8cad1714a43445c79ba420","analyzedAt":"2026-08-15T13:12:30.133Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}