Skip to content
Snippets Groups Projects
Commit f996d31c authored by Florian Schöppe's avatar Florian Schöppe Committed by Stefan Bürk
Browse files

[BUGFIX] Prevent exception caused by hash collisions in indexed_search

The indexed_search extension uses a truncated md5 hash for building a
word index. The truncation greatly increases the probability for
collisions. These collisions are the root cause for the problems that
are described in the related issues.

The best solution would be to either use full-length hashes or no
hashes at all. As this is not possible without changing the database
schema and rebuilding the whole word index, this patch prevents the
exceptions caused by the hash collisions. This is done by removing all
words with colliding hashes before the word index is updated.

Note that this patch just makes it possible to index page contents that
contain hash collisions (words with colliding hashes) again. The
affected words are obviously not added to the word index and though
won't yield results when searched for.

Resolves: #101249
Related: #84541
Related: #90977
Related: #87138
Releases: main, 12.4, 11.5
Change-Id: I5bf7d562ee42f63a5eeb99381b252018439bfaab
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74742


Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent e520a687
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment