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

Clam 2484: Fix warning when scanning some HTML files #1084

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

val-ms
Copy link
Contributor

@val-ms val-ms commented Nov 14, 2023

HTML files with <style> blocks containing non-utf8 sequences are causing warnings when processing them to extract base64 encoded images.

To resolve this, we can use the to_string_lossy() method that may allocate and sanitize a copy of the content if the non-utf8 characters are encountered.

Resolves: #1082

HTML files with <style> blocks containing non-utf8 sequences are causing
warnings when processing them to extract base64 encoded images.

To resolve this, we can use the to_string_lossy() method that may
allocate and sanitize a copy of the content if the non-utf8 characters
are encountered.

Resolves: Cisco-Talos#1082
@shutton shutton self-requested a review November 14, 2023 19:30
Copy link
Contributor

@shutton shutton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much cleaner

@val-ms val-ms merged commit 86ba9bc into Cisco-Talos:main Nov 21, 2023
23 checks passed
@val-ms val-ms deleted the CLAM-2484-file-bytes-not-valid branch November 21, 2023 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants