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

message-signatures: ASCII restriction in field-value to byte sequence #2415

Closed
reschke opened this issue Feb 19, 2023 · 7 comments · Fixed by #2505
Closed

message-signatures: ASCII restriction in field-value to byte sequence #2415

reschke opened this issue Feb 19, 2023 · 7 comments · Fixed by #2505

Comments

@reschke
Copy link
Contributor

reschke commented Feb 19, 2023

in 2.1.3:

Encode the bytes of the resulting field value's ASCII representation as a Byte Sequence.

What if the field value contains non-ASCII characters (from obs-text)?

Of course that could be considered an error, but I believe the intention is to be able to represent anything here. So the text should refer to the field value as byte sequence, in which case the encoding step would not be needed.

@jricher
Copy link
Contributor

jricher commented Feb 23, 2023

This text was added in response to a comment about needing to know which encoding to put into the byte sequence input, and the commenter suggested ASCII as the base for it. If field values have a well-defined byte sequence that isn't ASCII characters only, then we should refer to whatever that is from the HTTP docs.

@reschke
Copy link
Contributor Author

reschke commented Feb 24, 2023

Well, field values in HTTP can be anything. It's obsolete, it's deprecated, but that's what it is. So we need to deal with it one way or another.

I could live with UTF-8, and a note that if the octet sequence does not decode as UTF-8, you can't sign it.

@reschke
Copy link
Contributor Author

reschke commented Apr 14, 2023

@jricher - yes, you can merge and close issues as you wish, you are the editor. But by all means do not submit a new draft until the changes have been reviewed by those who opened the issue. (cc chairs @mnot @tfpauly )

@reschke
Copy link
Contributor Author

reschke commented Apr 14, 2023

As far as I can tell, the changes require percent-encoding only for non-ASCII values. That is, the character U+0080 would get the same encoding as a verbatim "%80" in a field value. I believe this is a problem.

@reschke reschke reopened this Apr 14, 2023
@jricher
Copy link
Contributor

jricher commented Apr 14, 2023

This issue has been addressed. There is no percent encoding needed in this section since the value is taken directly from the bytes of the field in a binary-wrapped representation, and the bytes are encoded using the base64 serialization of a Byte Sequence from Structured Fields:

Encode the bytes of the resulting field value as a Byte Sequence. Note that most fields are restricted to ASCII characters, but other octets could be included in the value in some implementations.

@jricher jricher closed this as completed Apr 14, 2023
@reschke
Copy link
Contributor Author

reschke commented Apr 15, 2023

I'm talking about the simple case, not the one where Byte Sequence encoding is used (yes, the issue title doesn't match anymore).

@reschke reschke reopened this Apr 15, 2023
@reschke
Copy link
Contributor Author

reschke commented Apr 15, 2023

Ok, opened new issue #2513

@reschke reschke closed this as completed Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants