Invalid target header name error no longer indicates which line was rejected #247

Closed
opened 2026-08-20 10:29:52 +02:00 by clawbot · 1 comment
Collaborator

Surfaced during review of #242. Not milestoned for 1.0; filed so the finding is recorded rather than lost in a review thread.

errHeaderNameInvalid now quotes nothing at all. That is a direct and correct consequence of #233, which required the error not to echo a possible secret — so this is a trade-off that landed, not a defect in that work.

The cost is operator UX: someone submitting a multi-line headers field gets no indication of WHICH line was rejected, and must bisect by hand.

Definition of done:

  • An operator submitting several header lines, one of which has an invalid name, can tell which line was rejected.
  • The error still never echoes a header VALUE, and never echoes raw bytes of the name — the property #233 established must not regress. A line number, an ordinal, or a strictly sanitised rendering of the name are all acceptable; the raw name is not.
  • A test asserts both halves: the rejected line is identifiable, and no secret material appears in the message.
Surfaced during review of https://git.eeqj.de/sneak/webhooker/pulls/242. Not milestoned for 1.0; filed so the finding is recorded rather than lost in a review thread. `errHeaderNameInvalid` now quotes nothing at all. That is a direct and correct consequence of https://git.eeqj.de/sneak/webhooker/issues/233, which required the error not to echo a possible secret — so this is a trade-off that landed, not a defect in that work. The cost is operator UX: someone submitting a multi-line headers field gets no indication of WHICH line was rejected, and must bisect by hand. Definition of done: - An operator submitting several header lines, one of which has an invalid name, can tell which line was rejected. - The error still never echoes a header VALUE, and never echoes raw bytes of the name — the property https://git.eeqj.de/sneak/webhooker/issues/233 established must not regress. A line number, an ordinal, or a strictly sanitised rendering of the name are all acceptable; the raw name is not. - A test asserts both halves: the rejected line is identifiable, and no secret material appears in the message.
Author
Collaborator

Dismissed by execution during the deployability audit. The line number is present on both paths.

Multi-line header config with a bad line 3 returns exactly Invalid headers: line 3: header name must be a valid HTTP token, on create and on edit. Duplicate and reserved-header errors carry it too: Invalid headers: line 2: header given more than once: "X-Dup" and Invalid headers: line 2: header is set by the delivery engine and cannot be overridden: "Host".

Closing.

Dismissed by execution during the deployability audit. The line number is present on both paths. Multi-line header config with a bad line 3 returns exactly `Invalid headers: line 3: header name must be a valid HTTP token`, on create and on edit. Duplicate and reserved-header errors carry it too: `Invalid headers: line 2: header given more than once: "X-Dup"` and `Invalid headers: line 2: header is set by the delivery engine and cannot be overridden: "Host"`. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/webhooker#247