-
Notifications
You must be signed in to change notification settings - Fork 252
Some API should be unsafe #153
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
Labels
Comments
|
I don't think that this is done. Yes, the Lines 158 to 171 in ad57bc2
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Function
borrowed_name
(in quick_xml::events::BytesStart) as is stated in documentation - can be used to create BytesStart from a given name. But if you pass (by mistake or intentionally) attribute data in the string alongside with the name this function does not parse those attributes nor verify if actually passed data is a valid name. It will treat any kind of data as a name even if it is not valid! This can lead to hard to find bugs as it is possible to confusefn borrowed_name
withfn borrowed
which seem to do similar things but lead to different internal state of BytesStart.As this function accepts invalid data it should be marked unsafe. The documentation must be more specific about how to use this function and how not. For example, it must be stated that this function does not verify passed data and if user intents to pass attributes too he/she should use
fn borrowed
.The text was updated successfully, but these errors were encountered: