synapse/synapse
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
..
_scripts Remove shebang line from module files (#10415) 2021-07-29 21:34:14 +01:00
api Rename MSC2716 things from chunk to batch to match /batch_send endpoint (#10838) 2021-09-21 15:06:28 -05:00
app Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
appservice Use inline type hints in various other places (in synapse/) (#10380) 2021-07-15 11:02:43 +01:00
config Always add local users to the user directory (#10796) 2021-09-21 12:02:34 +00:00
crypto Use direct references for some configuration variables (part 2) (#10812) 2021-09-15 08:34:52 -04:00
events Include outlier status in str(event) for V2/V3 events (#10879) 2021-09-22 12:30:59 +01:00
federation Use direct references for some configuration variables (part 2) (#10812) 2021-09-15 08:34:52 -04:00
groups Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
handlers Ensure we mark sent knocks as outliers (#10873) 2021-09-22 15:20:18 +01:00
http Add types to http.site (#10867) 2021-09-21 16:41:27 +00:00
logging Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
metrics [pyupgrade] synapse/ (#10348) 2021-07-19 15:28:05 +01:00
module_api Extend ModuleApi with the methods we'll need to reject spam based on …IP - resolves #10832 (#10833) 2021-09-22 13:09:43 +00:00
push Use direct references for some configuration variables (part 2) (#10812) 2021-09-15 08:34:52 -04:00
replication Use direct references for some configuration variables (#10798) 2021-09-13 13:07:12 -04:00
res Allow configuration of the oEmbed URLs. (#10714) 2021-08-31 18:37:07 -04:00
rest Include more information in oEmbed previews. (#10819) 2021-09-22 09:45:20 -04:00
server_notices Improve ServerNoticeServlet to avoid duplicate requests (#10679) 2021-08-27 09:16:40 +00:00
spam_checker_api Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
state Add type hints to state handler. (#10482) 2021-07-26 12:49:53 -04:00
static Display an error page during failure of fallback UIA. (#10561) 2021-08-18 08:13:35 -04:00
storage Treat "\u0000" as "\u0020" for the purposes of message search (message indexing) (#10820) 2021-09-22 08:25:26 -07:00
streams Add type hints for event streams. (#10856) 2021-09-21 13:34:26 -04:00
util Opt out of cache expiry for get_users_who_share_room_with_user (#10826) 2021-09-22 14:21:58 +01:00
__init__.py 1.43.0 2021-09-21 11:49:15 +01:00
event_auth.py Rename MSC2716 things from chunk to batch to match /batch_send endpoint (#10838) 2021-09-21 15:06:28 -05:00
notifier.py Add type hints for event streams. (#10856) 2021-09-21 13:34:26 -04:00
python_dependencies.py Validate new m.room.power_levels events (#10232) 2021-08-26 17:07:58 +01:00
server.py Use direct references for some configuration variables (part 2) (#10812) 2021-09-15 08:34:52 -04:00
types.py Fix /initialSync error due to unhashable RoomStreamToken (#10827) 2021-09-22 14:43:26 +01:00
visibility.py [pyupgrade] synapse/ (#10348) 2021-07-19 15:28:05 +01:00