Skip to content

Reject non-finite retry values in writeSSE - #5302

Open
gyanu2507 wants to merge 1 commit into
honojs:mainfrom
gyanu2507:fix/sse-retry-crlf
Open

Reject non-finite retry values in writeSSE#5302
gyanu2507 wants to merge 1 commit into
honojs:mainfrom
gyanu2507:fix/sse-retry-crlf

Conversation

@gyanu2507

Copy link
Copy Markdown

writeSSE already throws if event or id contain CR/LF. retry was concatenated as-is, so a non-number with line breaks could split the SSE frame.

Require a finite number before emitting retry:. retry: 0 still works.

Fixes #5299

event and id already throw on CR/LF. retry was interpolated as-is, so a string with line breaks could split the SSE frame. Require a finite number, which also covers retry: 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant