-
Notifications
You must be signed in to change notification settings - Fork 358
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 invalid UTF-8 characters in efibootmgr output #6060
Handle invalid UTF-8 characters in efibootmgr output #6060
Conversation
Hello @KKoukiou! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2025-01-08 16:58:07 UTC |
cacb137
to
df3b972
Compare
df3b972
to
a16d4f8
Compare
@nfrayer can you please share you opinion on this. |
@M4rtinK seemingly efibootmgr does not promise to return utf-8 only chars. https://bugzilla.redhat.com/show_bug.cgi?id=2292493#c21 So I guess it's fine to introduce this fix. |
a16d4f8
to
d22483b
Compare
Agreed, lets use this fix then & thanks for digging deeper into this, its good to have some context. :) |
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.
Looks good overall, just adding some improvement suggestions. :)
d22483b
to
46f3ce5
Compare
46f3ce5
to
6dea007
Compare
Modified the code to handle invalid UTF-8 characters in the output of the efibootmgr command by using `errors="replace"`. This prevents decode exceptions when encountering non-UTF-8 sequences in the EFI boot manager output [1]. [1] https://bugzilla.redhat.com/show_bug.cgi?id=2292493#c21 Resolves: rhbz#2254801
6dea007
to
816f494
Compare
@M4rtinK can you please re-review? |
/kickstart-tests --testtype uefi |
/kickstart-tests --testtype smoke |
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.
Looks perfect now, thanks! :)
Modified the code to handle invalid UTF-8 characters in the output of the efibootmgr command by
using
errors="replace"
. This prevents decode exceptions when encountering non-UTF-8 sequencesin the EFI boot manager output [1].
[1] https://bugzilla.redhat.com/show_bug.cgi?id=2292493#c21
Resolves: rhbz#2254801