Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WebTransport] Check event type before using its properties #31036

Merged
merged 1 commit into from
Sep 30, 2021

Conversation

yutakahirano
Copy link
Contributor

The below code is problematic

if self._session_stream_id == event.stream_id and
isinstance(event, WebTransportStreamDataReceived):

because it uses event's property before checking its type. This
leads to errors when event without stream_id comes here. This
change fixes that.

The below code is problematic

  if self._session_stream_id == event.stream_id and\
    isinstance(event, WebTransportStreamDataReceived):

because it uses event's property before checking its type. This
leads to errors when event without stream_id comes here. This
change fixes that.
@yutakahirano
Copy link
Contributor Author

@nidhijaju can you take a look?

@foolip foolip merged commit a302497 into master Sep 30, 2021
@foolip foolip deleted the yhirano/invalid-stream-id branch September 30, 2021 16:46
Gabisampaio pushed a commit to Gabisampaio/wpt that referenced this pull request Nov 18, 2021
…form-tests#31036)

The below code is problematic

  if self._session_stream_id == event.stream_id and\
    isinstance(event, WebTransportStreamDataReceived):

because it uses event's property before checking its type. This
leads to errors when event without stream_id comes here. This
change fixes that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants