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

fix: use sub_utf8 to strip headers value to not break utf8 strings #5313

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

dragoangel
Copy link
Contributor

@dragoangel dragoangel commented Jan 21, 2025

h.decoded:sub(1, headers_text_ignore_above) was leading to potential broken utf8 string as it had chance to strip line in the middle of utf8 character leading to errors like:

error while pushing logs to elastic, status: 400, type: mapper_parsing_exception, reason: failed to parse field [rspamd_meta.header_to] of type [text] in document with id 'X'. Preview of field's value: ''

also I added task digest

@dragoangel
Copy link
Contributor Author

dragoangel commented Jan 23, 2025

Hi @vstakhov is all okay with this pr? Can it be merged please?

@vstakhov vstakhov merged commit 2ffc6b6 into rspamd:master Jan 23, 2025
8 checks passed
@dragoangel dragoangel deleted the patch-8 branch January 23, 2025 17:08
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