synapse-product/synapse/storage
Hillery Shay f78b68a96b
Treat "\u0000" as "\u0020" for the purposes of message search (message indexing) (#10820)
* add test to check if null code points are being inserted

* add logic to detect and replace null code points before insertion into db

* lints

* add license to test

* change approach to null substitution

* add type hint for SearchEntry

* Add changelog entry

Signed-off-by: H.Shay <shaysquared@gmail.com>

* updated changelog

* update chanelog message

* remove duplicate changelog

* Update synapse/storage/databases/main/events.py remove extra space

Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>

* rename and move test file, update tests, delete old test file

* fix typo in comments

* update _find_highlights_in_postgres to replace null byte with space

* replace null byte in sqlite search insertion

* beef up and reorganize test for this pr

* update changelog

* add type hints and update docstring

* check db engine directly vs using env variable

* refactor tests to be less repetetive

* move rplace logic into seperate function

* requested changes

* Fix typo.

* Update synapse/storage/databases/main/search.py

Co-authored-by: reivilibre <olivier@librepush.net>

* Update changelog.d/10820.misc

Co-authored-by: Aaron Raimist <aaron@raim.ist>

Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
Co-authored-by: reivilibre <olivier@librepush.net>
Co-authored-by: Aaron Raimist <aaron@raim.ist>
2021-09-22 08:25:26 -07:00
..
databases Treat "\u0000" as "\u0020" for the purposes of message search (message indexing) (#10820) 2021-09-22 08:25:26 -07:00
engines Fix the inbound PDU metric (#10279) 2021-06-30 12:07:16 +01:00
schema Rename MSC2716 things from chunk to batch to match /batch_send endpoint (#10838) 2021-09-21 15:06:28 -05:00
util Speed up MultiWriterIdGenerator when lots of IDs are in flight. (#10755) 2021-09-03 18:23:46 +01:00
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
_base.py Remove unnecessary SystemRandom from SQLBaseStore (#9987) 2021-05-14 10:59:10 +01:00
background_updates.py Use inline type hints in http/federation/, storage/ and util/ (#10381) 2021-07-15 12:46:54 -04:00
database.py Fix remove_stale_pushers job on SQLite. (#10843) 2021-09-20 10:26:13 +01:00
keys.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
persist_events.py Generics for ObservableDeferred (#10491) 2021-07-28 19:55:50 +00:00
prepare_database.py Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
purge_events.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
push_rule.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
relations.py Name the type of token in "Invalid token" messages (#10815) 2021-09-14 11:25:05 +01:00
roommember.py Do not include rooms with an unknown room version in a sync response. (#10644) 2021-08-19 11:12:55 -04:00
state.py Add type hints to state database module. (#10823) 2021-09-15 09:54:13 -04:00
types.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00