Skip to content

Commit

Permalink
Revert back to an assertion inside Context.handle_message
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaine committed Dec 28, 2023
1 parent 5c6caef commit b5e29c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/aioquic/tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,9 +1421,10 @@ def handle_message(
elif self.state == State.SERVER_POST_HANDSHAKE:
raise AlertUnexpectedMessage

if not input_buf.eof():
# There is trailing garbage or our parsing was bad.
raise AlertDecodeError
# This condition should never be reached, because if the message
# contains any extra bytes, the `pull_block` inside the message
# parser will raise `AlertDecodeError`.
assert input_buf.eof()

def _build_session_ticket(
self, new_session_ticket: NewSessionTicket, other_extensions: List[Extension]
Expand Down

0 comments on commit b5e29c2

Please sign in to comment.