]> Sergey Matveev's repositories - public-inbox.git/commit
thread: prevent hidden threads in /$INBOX/ landing page
authorEric Wong <e@80x24.org>
Wed, 25 Apr 2018 08:52:48 +0000 (08:52 +0000)
committerEric Wong <e@80x24.org>
Wed, 25 Apr 2018 08:53:02 +0000 (08:53 +0000)
commitec2df4c3b80104a0bf15b0d917d82264bbf9b50e
treee934c76e91cfc64b4879cffe57a2112691414360
parent77704e711685d119fde9d1737029e102c76c9a14
thread: prevent hidden threads in /$INBOX/ landing page

In retrospect, the loop prevention done by our indexer is not
always sufficient since it can have an improperly sorted
or incomplete References headers.

This bug was triggered multiple bracketed Message-IDs in an
In-Reply-To: header (not References) where the Message-IDs were
in non-chronological order when somebody tried to reply to
different leafs of a thread with a single message.

So we must check for descendents before blindly trying to
use the last one.

Fixes: c6a8fdf71e2c336f ("thread: last Reference always wins")
lib/PublicInbox/SearchThread.pm
t/thread-cycle.t