-
Notifications
You must be signed in to change notification settings - Fork 333
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
Add strict mode to validate protocol strings #3435
Comments
We could also use the bstr crate if possible... |
Hi, would be first time contributor here 👋 |
You may search "// safety: we expect all labels are UTF-8 encoded strings." in the code and this issue is about add a strict mode to check the value of PromLabel are valid UTF-8 strings. It would require:
What's your plan to handle this issue? I expect to listen to your plan; bare assignment and waiting until stale is not a good practice. |
Thanks for the info @tisonkun. |
We could add a greptimedb/src/servers/src/http.rs Lines 115 to 127 in 74862f8
Using |
@carmooo though you almost repeat my comment ... it's the way to go! Lol. Do not hesitate to ask here if you stall by any uncertaincy. And you can send a draft PR when a rough impl is ready so that we can involve early. |
@carmooo I'd suggest adding an option to enable the validation as it is much easier to implement. You could pass the strict mode flag to the greptimedb/src/servers/src/query_handler.rs Lines 100 to 106 in 74862f8
|
Sorry for backing out but cannot take care of this right now. |
Never mind. Thanks for your time and sharing :D |
can i take it? |
@irenjj Of course you can take it. But the same as above, without certain progress, bare assignment doesn't help. You can ask any questions or submit a patch without an assignment. |
Assigned. But I'd still clarify that "Can I take it" doesn't help a lot. Everyone is welcome to take over an issue here so it's not even a question. You can ping me once a (draft) PR is available or any certain questions. |
Closed by #3638 |
For performance reasons, we expect requests from the remote write protocol to be valid protobuf bytes. We should provide a strict mode to perform UTF-8 validation.
Originally posted by @evenyag in #3425 (comment)
The text was updated successfully, but these errors were encountered: