-
Notifications
You must be signed in to change notification settings - Fork 811
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
all: return error from concrete type for non-UTF8 strings #1322
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about keys passed elsewhere (attributes, NewRangeReader, etc.)?
For attributes, I haven't added any escaping for those yet. I'm not that worried about it since I don't think there's any expectation that user-invented strings should work (e.g., the reasonable values are defined by some spec). If it becomes a problem we can add validation of those fields, but it's likely to be much more than just "is UTF8". For NewRangeReader, I expect that they are going to get some kind of error anyway since there's no way the blob exists with a non-UTF8-string key. Do you think it's worth adding a check (and also in Delete, etc.) to short-circuit? |
Is that true across all providers? None of them support binary key names? |
Pretty sure. Well, memblob probably does. It's probably safer to verify, so I've added that. |
PTAL |
Applied to the same set of strings we're escaping:
Verified with conformance tests.
Fixes #1322.