1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:47:34 +00:00

AK+Everywhere: Make Base64 decoding fallible

This commit is contained in:
Ben Wiederhake 2021-10-23 15:43:59 +02:00 committed by Linus Groh
parent 3bf1f7ae87
commit cb868cfa41
11 changed files with 73 additions and 32 deletions

View file

@ -493,7 +493,7 @@ void MailWidget::selected_email_to_load()
if (selected_alternative_encoding.equals_ignoring_case("7bit") || selected_alternative_encoding.equals_ignoring_case("8bit")) {
decoded_data = encoded_data;
} else if (selected_alternative_encoding.equals_ignoring_case("base64")) {
decoded_data = decode_base64(encoded_data);
decoded_data = decode_base64(encoded_data).value_or(ByteBuffer());
} else if (selected_alternative_encoding.equals_ignoring_case("quoted-printable")) {
decoded_data = IMAP::decode_quoted_printable(encoded_data);
} else {