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

Handle overlong icon values #27

Merged
merged 1 commit into from
Feb 22, 2024
Merged

Conversation

robin-nitrokey
Copy link
Member

We skip the icon field during deserialization if it is too long. Previously, we directly tried to deserialize a String and ignored any errors. This means that we also ignored any other errors, e. g. for invalid data types.

This patch changes the implementation to first deserialize a string slice and handle errors occuring during the deserialization. Then we check if the string slice fits into String or if we should ignore the value.

We skip the icon field during deserialization if it is too long.
Previously, we directly tried to deserialize a String<N> and ignored any
errors.  This means that we also ignored any other errors, e. g. for
invalid data types.

This patch changes the implementation to first deserialize a string
slice and handle errors occuring during the deserialization.  Then we
check if the string slice fits into String<N> or if we should ignore the
value.
@robin-nitrokey robin-nitrokey merged commit 885bceb into trussed-dev:main Feb 22, 2024
4 checks passed
@robin-nitrokey robin-nitrokey deleted the icon branch February 22, 2024 12:52
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 this pull request may close these issues.

3 participants