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 invalid UTF-8 characters in efibootmgr output #6060

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KKoukiou
Copy link
Contributor

Modified the code to handle invalid UTF-8 characters in the output of the efibootmgr command by using errors="ignore". This prevents decode exceptions when encountering non-UTF-8 sequences in the EFI boot manager output.

This should be reverted when this is fixed upstream in the efibootmgr: Possible fix: rhboot/efibootmgr#221

Resolves: rhbz#2254801

@pep8speaks
Copy link

pep8speaks commented Dec 19, 2024

Hello @KKoukiou! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2024-12-20 08:37:29 UTC

@github-actions github-actions bot added the f42 Fedora 42 label Dec 19, 2024
@KKoukiou KKoukiou requested a review from M4rtinK December 19, 2024 14:41
@KKoukiou KKoukiou force-pushed the efibootmgr-nonutf8-tempfix branch from cacb137 to df3b972 Compare December 19, 2024 14:43
@KKoukiou KKoukiou force-pushed the efibootmgr-nonutf8-tempfix branch from df3b972 to a16d4f8 Compare December 19, 2024 14:55
@KKoukiou
Copy link
Contributor Author

@nfrayer can you please share you opinion on this.

@KKoukiou
Copy link
Contributor Author

@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.

Modified the code to handle invalid UTF-8 characters in the output of the efibootmgr command by
using `errors="ignore"`. This prevents decode exceptions when encountering non-UTF-8 sequences
in the EFI boot manager output.

This should be reverted when this is fixed upstream in the efibootmgr:
Possible fix: rhboot/efibootmgr#221

Resolves: rhbz#2254801
@KKoukiou KKoukiou force-pushed the efibootmgr-nonutf8-tempfix branch from a16d4f8 to d22483b Compare December 20, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f42 Fedora 42
Development

Successfully merging this pull request may close these issues.

2 participants