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

Deserializing invalid characters in a base64 string does not raise an error #874

Closed
SrirachaHorse opened this issue Dec 8, 2023 · 0 comments · Fixed by #875
Closed

Deserializing invalid characters in a base64 string does not raise an error #874

SrirachaHorse opened this issue Dec 8, 2023 · 0 comments · Fixed by #875

Comments

@SrirachaHorse
Copy link
Contributor

If deserializing a base16 string with invalid characters, binascii.unhexlify() throws a validation error. This is caught by xsdata and thrown as a ConverterError.

By comparison if deserializing a base64 string with invalid characters, b64decode() does not throw a validation error, as no validate flag is being passed to the decode method. Instead, the method will ignore any invalid characters, which is less than desirable.

If base16 strings are throwing validation errors on invalid characters then base64 strings should be treated similarly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant