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

Ensure stream identifiers are limited to the correct character set #25

Open
jen20 opened this issue Jun 9, 2020 · 1 comment
Open
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jen20
Copy link
Contributor

jen20 commented Jun 9, 2020

As of #21, stream identifiers are now structured, but represented on the wire as ByteString types. @jageall suggests that these should be limited in which bytes are acceptable, and that the encoding should then be ASCII rather than UTF-8 (though they are identical for the acceptable range of bytes). We should enforce this from the start in this client.

@jageall, what are the restrictions which need to be implemented here?

@jen20 jen20 added the bug Something isn't working label Jun 9, 2020
@jen20 jen20 added this to the v1 milestone Jun 9, 2020
@jen20 jen20 self-assigned this Jun 9, 2020
@jageall
Copy link
Contributor

jageall commented Jun 15, 2020

static readonly byte[] IllegalBytes = {
0x00,
0x01,
0x02,
0x03,
0x04,
0x05,
0x06,
0x07,
0x08,
0x09,
0x0A,
0x0B,
0x0C,
0x0D,
0x0E,
0x0F,
0x10,
0x11,
0x12,
0x13,
0x14,
0x15,
0x16,
0x17,
0x18,
0x19,
0x1A,
0x1B,
0x1C,
0x1D,
0x1E,
0x1F,
0x20,
0x21,
0x22,
0x23,
0x24,
0x25,
0x26,
0x27,
0x28,
0x29,
0x2a,
0x2b,
0x2c,
0x2f,
0x3a,
0x3b,
0x3c,
0x3d,
0x3e,
0x3f,
0x5b,
0x5c,
0x5d,
0x5e,
0x60,
0x7b,
0x7c,
0x7d,
0x7e,
0x7f
};

Anything above 0x7f is also considered illegal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants