Commit Graph

162 Commits (6dbdabf9fd325a1010e6144a60b9bf7bdc9dc673)

Author SHA1 Message Date
binwiederhier 6b4971786f Fix intermittent test failure; add test for expiring messages after reservation removal 2023-02-12 12:08:56 -05:00
binwiederhier cfcc3793c5 Fix 404 race when uploading attachments 2023-02-10 21:44:12 -05:00
binwiederhier e6bb5f484c Self-review, round 2 2023-02-09 15:24:12 -05:00
binwiederhier bcb22d8d4c Added disallowed-topics 2023-02-09 08:32:51 -05:00
binwiederhier 7706bd9845 Fix racing test 2023-02-08 20:00:10 -05:00
binwiederhier e1a4a74905 Auth rate limiter 2023-02-08 15:20:44 -05:00
binwiederhier e3b39f670f WIP tier CLI 2023-02-06 22:38:22 -05:00
binwiederhier 7cc8c81bd8 Continued logging work 2023-02-05 23:34:27 -05:00
binwiederhier c12ecb9f21 More tests 2023-01-29 20:11:58 -05:00
binwiederhier f4c54a1643 Associate file downloads with uploader 2023-01-29 15:11:26 -05:00
binwiederhier 0e36ac84d8 Test anonymous user is same as non-tier user 2023-01-28 21:27:05 -05:00
binwiederhier e596834096 Add "last access" to access tokens 2023-01-28 20:29:06 -05:00
binwiederhier 000bf27c87 Speed up tests, hopefully fix races 2023-01-28 09:03:14 -05:00
binwiederhier 62140ec001 Rate limiting refactor, race fixes, more tests 2023-01-27 11:33:51 -05:00
binwiederhier 22c66203a0 Reset message limiter, test 2023-01-27 09:42:54 -05:00
binwiederhier 810a29ea72 Fix go vet 2023-01-26 23:10:58 -05:00
binwiederhier c874a641df Rate limits make sense now! 2023-01-26 22:57:18 -05:00
binwiederhier 236254d907 Add bandwidth limit to tier; fix display name sync issues 2023-01-25 10:05:54 -05:00
binwiederhier 954d919361 Delayed deletion 2023-01-22 22:21:30 -05:00
binwiederhier 9c082a8331 Introduce text IDs for everything (esp user), to avoid security and accounting issues 2023-01-21 23:15:22 -05:00
binwiederhier 31a3bb7cd6 Payments webhook test, delete attachments/messages when reservations are removed, 2023-01-20 22:47:37 -05:00
binwiederhier 3bd6518309 Fix a bunch of FIXMEs 2023-01-18 15:50:06 -05:00
binwiederhier f945fb4cdd A little polishing, make upgrade banner work when not logged in 2023-01-18 13:46:40 -05:00
binwiederhier 3dd8dd4288 Stats resetter at midnight UTC 2023-01-10 22:51:51 -05:00
binwiederhier 7e528d9c10 Sync topic (begin), rename user fields 2023-01-09 21:53:21 -05:00
binwiederhier 3aba7404fc Tiers make sense for admins now 2023-01-09 15:40:46 -05:00
binwiederhier d8032e1c9e Tier based tests 2023-01-08 20:46:46 -05:00
binwiederhier 1f54adad71 Rename plan->tier, topics->reservations, more tests, more todos 2023-01-07 21:04:13 -05:00
binwiederhier a54a11db88 Plan-based message and attachment expiry 2023-01-07 09:34:02 -05:00
binwiederhier ac4042ca04 Tests for /access endpoints 2023-01-06 10:45:38 -05:00
binwiederhier 4b9d40464c Replace read/write flags with Permission 2023-01-02 21:12:42 -05:00
binwiederhier 2267d27c9b User-owned ACL entries 2023-01-01 15:21:43 -05:00
binwiederhier 367d024a2d Simplify API endpoints; add endpoint tests 2022-12-28 19:55:11 -05:00
binwiederhier d9722a9825 Fix almost all tests 2022-12-27 22:14:14 -05:00
binwiederhier d4c7ad4beb Rename auth package to user; add extendToken feature 2022-12-25 11:41:38 -05:00
binwiederhier 2b78a8cb51 Associate messages with a user 2022-12-19 21:42:36 -05:00
binwiederhier 6598ce2fe4 Limits 2022-12-19 09:59:32 -05:00
Philipp Heckel 54eae00774 Intermittent test failure 2022-10-09 08:53:40 -04:00
Karmanyaah Malhotra 3b29294679 minor modification to tests involving ips 2022-10-07 20:27:22 -05:00
Karmanyaah Malhotra c2382d29a1 refactor visitor IPs and allow exempting IP Ranges
Use netip.Addr instead of storing addresses as strings. This requires
conversions at the database level and in tests, but is more memory
efficient otherwise, and facilitates the following.

Parse rate limit exemptions as netip.Prefix. This allows storing IP
ranges in the exemption list. Regular IP addresses (entered explicitly
or resolved from hostnames) are IPV4/32, denoting a range of one
address.
2022-10-05 16:04:42 -05:00
Hunter Kehoe 99886d7f66 change icon from object to string 2022-07-17 15:40:24 -06:00
Hunter Kehoe d519fd999b notification icons 2022-07-16 14:13:46 -06:00
Philipp Heckel 88a77cb132 Fix race 2022-07-08 10:16:23 -04:00
Philipp Heckel 5f2ce5e542 Fix intermittent test failure; bump version 2022-06-23 15:01:35 -04:00
Philipp Heckel 113900d3eb Cache startup queries 2022-06-23 11:02:45 -04:00
Philipp Heckel b74defef14 Enable WAL mode, add changelog 2022-06-22 20:17:47 -04:00
Philipp Heckel 3334d84861 Fix another race, add test 2022-06-22 15:11:50 -04:00
Philipp Heckel d05211648d Fix `since=<id>` implementation for multiple topics, closes #336 2022-06-20 12:11:52 -04:00
Philipp Heckel 25a4b29ffc Return HTTP 500 on Matrix discovery GET if base-url not configured; log entire HTTP request when TRACE enabled 2022-06-19 21:25:35 -04:00
Philipp Heckel 9918f4965d Only use last X-Forwarded-For address as visitor address, closes #328 2022-06-16 15:31:09 -04:00
Philipp Heckel 8a56b82813 500-test 2022-06-16 12:42:19 -04:00
Philipp Heckel 18bd3c0e55 Docs and Matrix tests 2022-06-16 11:40:56 -04:00
Philipp Heckel 91375b2e8e Minor refactor, added GET 2022-06-15 16:03:12 -04:00
Philipp Heckel 2b42cea1a3 Allow HEAD requests for file attachments 2022-06-10 21:33:39 -04:00
Philipp Heckel 7845eb0124 So much logging 2022-06-01 23:24:44 -04:00
Philipp Heckel 8c32f029fb Fix data races 2022-05-31 23:55:05 -04:00
Philipp Heckel c80e4e1aa9 Make Firebase logic testable, test it 2022-05-31 23:16:44 -04:00
Philipp Heckel f9284a098a Store Sender IP in DB for delayed messages 2022-05-31 21:39:19 -04:00
Philipp Heckel 8283b6be97 Firebase quota limit 2022-05-31 20:38:56 -04:00
Curid 9684629549 Add disable option to web-root
Closes #238
2022-05-13 17:08:07 +00:00
Philipp Heckel 8f4a1db1f0 Changelog, add tests 2022-04-22 14:51:44 -04:00
Philipp Heckel 73349cd423 Add test 2022-04-03 20:19:43 -04:00
Philipp Heckel aba7e86cbc Attachment behavior fix for Firefox 2022-04-03 12:39:52 -04:00
Philipp Heckel 59ec2de8bd Fix race in test 2022-03-30 14:37:42 -04:00
Philipp Heckel b67d9fc85d Added missing 'delay' and 'email' params to publish as json 2022-03-29 15:40:26 -04:00
Philipp Heckel b409c89d3b Do not allow comma in topic name in publish via GET endpoint (no ticket) 2022-03-23 14:29:55 -04:00
Philipp Heckel 8fcc40942f Publish as JSON 2022-03-16 14:16:54 -04:00
Philipp Heckel 207e990798 Fix brittle test 2022-03-13 21:30:14 -04:00
Philipp Heckel 36ccfac787 Fix tests 2022-03-05 20:48:27 -05:00
Philipp Heckel cda9dfa9d0 Merge branch 'main' into ui 2022-02-27 16:10:21 -05:00
Philipp Heckel 4cd30c35ce Rename cache to messageCache 2022-02-27 14:47:28 -05:00
Philipp Heckel 8b32cfaaff Implement since=ID logic in mem cache; add tests; still failing 2022-02-26 20:19:28 -05:00
Philipp Heckel 530f55c234 Fully support auth in Web UI; persist users in localStorage (for now); add ugly ?auth=... param 2022-02-25 23:25:04 -05:00
Philipp Heckel ce9e9f3e0d Add test for IP exempt setting 2022-02-14 19:23:57 -05:00
Philipp Heckel 0df8aa9a5d Replace \\n with \n in X-Message header 2022-02-13 09:23:55 -05:00
Philipp Heckel 631ade5430 Support multiple topics in auth 2022-01-27 12:49:05 -05:00
Philipp Heckel e61a0c2f78 Add /auth endpoint and tests 2022-01-25 23:04:09 -05:00
Philipp Heckel df6611e8de Store encoding in cache database 2022-01-17 19:14:51 -05:00
Philipp Heckel 4ceb058a40 Handle binary messages for UnifiedPush 2022-01-17 13:28:07 -05:00
Philipp Heckel 2b6363474e Combine things, move stuff 2022-01-15 23:17:46 -05:00
Philipp Heckel a75f74b471 Bump version; update docs 2022-01-14 12:23:58 -05:00
Philipp Heckel e50779664d Remove peaking, addresses #93 2022-01-14 12:13:14 -05:00
Philipp Heckel 034c81288c Docs docs docs 2022-01-13 15:17:30 -05:00
Philipp Heckel 38b28f9bf4 CLI; docs docs docs 2022-01-12 21:24:48 -05:00
Philipp Heckel aa94410308 Daily traffic limit 2022-01-12 18:52:07 -05:00
Philipp Heckel c76e55a1c8 Making RateLimiter and FixedLimiter, so they can both work with LimitWriter 2022-01-12 17:03:28 -05:00
Philipp Heckel f6b9ebb693 Lots of tests 2022-01-12 11:05:04 -05:00
Philipp Heckel 24eb27d41c Merge branch 'main' into attachments 2022-01-05 00:25:49 +01:00
Philipp Heckel 2e40b895a7 Fix message truncation, relates to #84 2022-01-04 21:09:47 +01:00
Philipp Heckel 76d102f964 Add "truncated" flag to let Android app know 2022-01-04 20:53:32 +01:00
Philipp Heckel 807d2b0d9d Truncate FCM messages if they are too long; This was trickier than expected; relates to #84 2022-01-04 20:43:37 +01:00
Philipp Heckel eb5b86ffe2 WIP: Attachments 2022-01-02 23:56:12 +01:00
Philipp Heckel 7b37141e07 Increase message size limit to 4096 2021-12-31 16:12:53 +01:00
Philipp Heckel d6762276f5 Test 2021-12-25 22:07:55 +01:00
Philipp Heckel 7a23779d07 JSON API errors 2021-12-25 15:15:05 +01:00
Philipp Heckel f553cdb282 Continued e-mail support 2021-12-24 15:01:29 +01:00
Philipp Heckel 6b46eb46e2 A mutex in a test struct ... 2021-12-24 00:10:22 +01:00
Philipp Heckel 7280ae1ebc Email rate limiting + tests 2021-12-24 00:03:04 +01:00
Philipp Heckel 85939618c8 Fix Poll(); yeyy tests 2021-12-22 23:45:19 +01:00
Philipp Heckel 6a7e9071b6 Tests, client tests WIP 2021-12-22 14:17:50 +01:00