]> git.ipfire.org Git - thirdparty/public-inbox.git/commit
searchidx: don't index Base-85 w/ CRLF endings
authorEric Wong <e@80x24.org>
Wed, 19 Feb 2025 10:10:32 +0000 (10:10 +0000)
committerEric Wong <e@80x24.org>
Thu, 20 Feb 2025 08:02:50 +0000 (08:02 +0000)
commit719dd657b349dc43fb44db2764d145b3d04deb9e
tree9d9181f6afdfd2839884aa576c1d4381fec2d0eb
parentf8e2716f10c6e86deba78cdc22d4f91406389330
searchidx: don't index Base-85 w/ CRLF endings

I encountered a false positive search result from a CRLF message
with a Base-85 patch in it.  It turns out our Base-85 filtering
code didn't account for the possibility of "\r" showing up in
patch messages, so just ignore all trailing spaces (not just
horizontal spaces) in index_diff().

While we're at it, exclude horizontal whitespace and CR
consistently from Base-85-looking quoted text in
index_body_text(), too, since I'm sure there's messages with
CRCRLF in the wild, too...
lib/PublicInbox/SearchIdx.pm