gotosocial/internal/db/bundb
kim 69dd5fed2c
[feature] domain block wildcarding (#1178)
* for domain block lookups, lookup along subdomain parts

Signed-off-by: kim <grufwub@gmail.com>

* only lookup up to a max of 5 domain parts to prevent DOS, limit inserted domains to max of 5 subdomains

Signed-off-by: kim <grufwub@gmail.com>

* add test for domain block wildcarding

Signed-off-by: kim <grufwub@gmail.com>

* check cached status first, increase cached domain time

Signed-off-by: kim <grufwub@gmail.com>

* fix domain wildcard part building logic

Signed-off-by: kim <grufwub@gmail.com>

* create separate domain.BlockCache{} type to hold all domain blocks in memory

Signed-off-by: kim <grufwub@gmail.com>

* remove unused variable

Signed-off-by: kim <grufwub@gmail.com>

* add docs and test to domain block cache, check for domain == host in domain block getter funcs

Signed-off-by: kim <grufwub@gmail.com>

* add license text

Signed-off-by: kim <grufwub@gmail.com>

* check order in which we check primary cache

Signed-off-by: kim <grufwub@gmail.com>

* add better documentation of how domain block checking is performed

Signed-off-by: kim <grufwub@gmail.com>

* change

Signed-off-by: kim <grufwub@gmail.com>

Signed-off-by: kim <grufwub@gmail.com>
2022-12-14 10:55:36 +01:00
..
migrations [feature] overhaul the oidc system (#961) 2022-12-06 14:15:56 +01:00
account.go [feature] Allow users to create + delete bookbarks, and view bookmarked statuses (#1168) 2022-12-09 11:37:12 +01:00
account_test.go [feature] Allow users to create + delete bookbarks, and view bookmarked statuses (#1168) 2022-12-09 11:37:12 +01:00
admin.go [chore] move caches to a separate State{} structure (#1078) 2022-12-08 18:35:14 +01:00
admin_test.go [chore] update database caching library (#1040) 2022-11-15 18:45:15 +00:00
basic.go [chore] Standardize database queries, use bun.Ident() properly (#886) 2022-10-08 13:50:48 +02:00
basic_test.go [chore] Update bun / sqlite versions; update gtsmodels (#754) 2022-08-15 11:35:05 +01:00
bundb.go [chore] move caches to a separate State{} structure (#1078) 2022-12-08 18:35:14 +01:00
bundb_test.go [feature] Add emoji DELETE handler at /api/v1/admin/custom_emojis (#913) 2022-10-14 17:30:04 +02:00
bundbnew_test.go [chore] move caches to a separate State{} structure (#1078) 2022-12-08 18:35:14 +01:00
conn.go [chore] update dependencies, bump to Go 1.19.1 (#826) 2022-09-28 18:30:40 +01:00
domain.go [feature] domain block wildcarding (#1178) 2022-12-14 10:55:36 +01:00
domain_test.go [feature] domain block wildcarding (#1178) 2022-12-14 10:55:36 +01:00
emoji.go [chore] move caches to a separate State{} structure (#1078) 2022-12-08 18:35:14 +01:00
emoji_test.go [bugfix] Avoid accidentally marking changed emojis as orphaned + pruning them (#1188) 2022-11-30 16:20:57 +01:00
errors.go [feature] Fetch + display custom emoji in statuses from remote instances (#807) 2022-09-12 13:03:23 +02:00
hook.go [chore] use our own logging implementation (#716) 2022-07-19 10:47:55 +02:00
instance.go [chore] Standardize database queries, use bun.Ident() properly (#886) 2022-10-08 13:50:48 +02:00
instance_test.go [chore] Standardize database queries, use bun.Ident() properly (#886) 2022-10-08 13:50:48 +02:00
media.go [feature] allow uncaching of other media types (#1234) 2022-12-12 12:22:19 +01:00
media_test.go [feature] allow uncaching of other media types (#1234) 2022-12-12 12:22:19 +01:00
mention.go [chore] move caches to a separate State{} structure (#1078) 2022-12-08 18:35:14 +01:00
mention_test.go Extend license notices to 2022 (#354) 2021-12-20 18:42:19 +01:00
notification.go [chore] move caches to a separate State{} structure (#1078) 2022-12-08 18:35:14 +01:00
notification_test.go [feature] Prune timelines once per hour to plug memory leak (#1117) 2022-11-22 18:38:10 +00:00
relationship.go [chore] move caches to a separate State{} structure (#1078) 2022-12-08 18:35:14 +01:00
relationship_test.go [performance] add account block DB cache and remove block query joins (#1085) 2022-11-20 16:33:49 +00:00
session.go [chore] Standardize database queries, use bun.Ident() properly (#886) 2022-10-08 13:50:48 +02:00
session_test.go [chore] Standardize database queries, use bun.Ident() properly (#886) 2022-10-08 13:50:48 +02:00
status.go [chore] move caches to a separate State{} structure (#1078) 2022-12-08 18:35:14 +01:00
status_test.go [chore] Standardize database queries, use bun.Ident() properly (#886) 2022-10-08 13:50:48 +02:00
timeline.go [bugfix] fix unordered favorites (#1245) 2022-12-13 12:33:49 +01:00
timeline_test.go [chore] update database caching library (#1040) 2022-11-15 18:45:15 +00:00
tombstone.go [chore] move caches to a separate State{} structure (#1078) 2022-12-08 18:35:14 +01:00
user.go [chore] move caches to a separate State{} structure (#1078) 2022-12-08 18:35:14 +01:00
user_test.go [chore] update database caching library (#1040) 2022-11-15 18:45:15 +00:00
util.go [chore] Standardize database queries, use bun.Ident() properly (#886) 2022-10-08 13:50:48 +02:00