Skip to content

[Gap]: forms confirmation cannot safely show opted-in submitted fields #527

Closed

Description

@jimhoyd

What you were trying to do

In test5/contact-form, an agent built a URLCode contact flow that must return a 201 confirmation containing the submitted synthetic name. The existing forms extension already covers the field rendering, URL-encoded admission, CSRF, escaping, and validation, but its confirmation page is fixed.

Where it broke down

forms confirmation accepts only fixed title/message values. Its onSubmit hook receives validated values but is action-only and cannot produce a confirmation view. The agent therefore wrote a trusted route function that parses the body, validates fields, HTML-escapes name/email, and constructs the confirmation HTML.

Code or YAML you had to write by hand

Sanitized hand-written seam: const confirmationHtml =

Thank you, ${escapeHtml(name)}.

; return new Response(confirmationHtml, {status: 201}). This duplicates form parsing, validation, escaping, response construction, and no-store handling that forms otherwise owns.

What you could not verify

One successful benchmark run establishes the narrow gap; it does not establish a general templating requirement. A solution must not expose submitted values by default or put sensitive values in an unbounded redirect URL/cookie. Evaluate a bounded explicit allowlist of fields, escaped rendering, no-store behavior, and a short-lived confirmation handoff bound to the browser. Related: #425 introduced forms; #520 defines the evidence-feedback loop.

Activity

  1. added
    ai-first
    needs-decision
    on Sep 23, 2026
  2. jimhoyd commented on Sep 24, 2026

    @jimhoyd
    CollaboratorAuthor

    Triage decision: retain as evidence-gathering, not an implementation commitment. Do not add confirmation-value rendering until repeated independent evidence establishes a bounded, safe portable contract; preserve the issue guardrails as future acceptance criteria. Removing needs-decision.

  3. added
    enhancement
    extension
    and removed
    needs-decision
    on Sep 24, 2026
  4. jimhoyd commented on Sep 24, 2026

    @jimhoyd
    CollaboratorAuthor

    Decision (owner, 2026-09-24): build it — an explicit per-flow field allowlist shown on the confirmation page, carried by a short-lived handoff signed with the CSRF secret and bound to the forms CSRF binding cookie, no-store, never in URLs. Work starting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-firstenhancementextension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions