]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] lua_content: Move PDF ligature substitutions from string unescape to text handler
authorVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 6 Feb 2026 17:42:55 +0000 (17:42 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Fri, 6 Feb 2026 17:42:55 +0000 (17:42 +0000)
commiteb1acde80cbbe1750835a3d07b133435f9bf30ed
tree82b574a97b37d5ee4a598987c61aee1f0068bef7
parent506ef44b8c69c042bd69a77404e0dc3d960a2f4f
[Fix] lua_content: Move PDF ligature substitutions from string unescape to text handler

StandardEncoding/MacRomanEncoding ligature substitutions (e.g. byte 0xAD -> 'ffl')
were applied to all PDF strings including /URI annotation values. This corrupted
soft hyphens (U+00AD) in URLs, preventing the URL parser from detecting zero-width
space obfuscation and setting the ZW_SPACES flag.

Move ligature substitutions to text_op_handler where they belong, so they only
apply to rendered text content (Tj/TJ operators), not to dictionary string values.
lualib/lua_content/pdf.lua