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

forbid empty NEW_TOKEN frames #2977

Merged

Conversation

marten-seemann
Copy link
Contributor

@marten-seemann marten-seemann commented Aug 17, 2019

Closes #2978.

If we allow empty NEW_TOKEN frames, the receiver would have to check that the token is not empty before saving and reusing it, so it seems slightly easier to forbid this nonsensical edge case.

@martinthomson martinthomson added -transport editorial An issue that does not affect the design of the protocol; does not require consensus. design An issue that affects the design of the protocol; resolution requires consensus. and removed editorial An issue that does not affect the design of the protocol; does not require consensus. labels Aug 19, 2019
@martinthomson martinthomson mentioned this pull request Aug 19, 2019
@@ -4843,7 +4843,8 @@ Token Length:

Token:

: An opaque blob that the client may use with a future Initial packet.
: An opaque blob that the client may use with a future Initial packet. The token
MUST NOT be empty.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you want to specify the connection close error to use if it's empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use a FRAME_ENCODING_ERROR error here. However, for other invalid frame errors we use PROTOCOL_VIOLATION. Not sure if that's something we want to address at some point.

@martinduke
Copy link
Contributor

Like @ianswett, I would like the spec to specify the error code. I don't care which it is.

@marten-seemann
Copy link
Contributor Author

Consensus was declared on this PR a couple of days ago. Can we get this merged, and deal with the error code requested by @ianswett and @martinduke as part of #3027?

@martinthomson martinthomson merged commit 5a16d67 into quicwg:master Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-transport design An issue that affects the design of the protocol; resolution requires consensus.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty NEW_TOKEN
5 participants