Skip to content

SSE decoder accepts invalid retry field values #3834

Description

@sylvesterkaczmarek

SSEDecoder.decode() currently uses int(value) for the retry field. That accepts values such as -1 and +1000, although the SSE format only accepts retry values made entirely of ASCII digits.

Example: retry: -1, followed by data: ok and a blank line, produces an event with retry == -1 instead of ignoring the invalid retry field.

Expected behavior: accept only [0-9]+ retry values and ignore other forms.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions