Commit graph

380 commits

Author SHA1 Message Date
binwiederhier
88abd8872d Changing password should confirm the old password 2023-01-21 20:52:16 -05:00
binwiederhier
c66a9851cc Re-add password confirmation 2023-01-21 20:07:39 -05:00
binwiederhier
14f3571e67 More TODOs 2023-01-21 16:19:48 -05:00
binwiederhier
5a7cedce95 More TODOs, hurray 2023-01-21 16:02:56 -05:00
binwiederhier
5b14c76e54 Revert home page to existing page 2023-01-21 08:55:31 -05:00
binwiederhier
31a3bb7cd6 Payments webhook test, delete attachments/messages when reservations are removed, 2023-01-20 22:47:37 -05:00
binwiederhier
45b97c7054 Deleting account deletes subscription 2023-01-19 14:03:39 -05:00
binwiederhier
4e51a715c1 Allow mocking the Stripe API 2023-01-18 23:01:26 -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
cead305a9a Make prettier 2023-01-17 20:21:19 -05:00
binwiederhier
695c1349e8 Upgrade dialog 2023-01-17 10:09:37 -05:00
binwiederhier
83de879894 publishSyncEvent, Stripe endpoint changes 2023-01-16 16:35:37 -05:00
binwiederhier
7faed3ee1e Add "Canceled" banner 2023-01-16 10:35:12 -05:00
binwiederhier
c06bfb989e Payment stuff, cont'd 2023-01-15 23:29:46 -05:00
binwiederhier
01fd4754f9 WIP: Stripe integration 2023-01-14 06:43:44 -05:00
binwiederhier
7007c0a0bd Docs 2023-01-12 12:04:18 -05:00
binwiederhier
24529bd0ad Rename /access to /reservation 2023-01-12 10:50:09 -05:00
binwiederhier
3dd8dd4288 Stats resetter at midnight UTC 2023-01-10 22:51:51 -05:00
binwiederhier
2908c429a5 Set sync_topic in migration 2023-01-10 15:41:08 -05:00
binwiederhier
7e528d9c10 Sync topic (begin), rename user fields 2023-01-09 21:53:21 -05:00
binwiederhier
b27c608508 useContext work in JS 2023-01-09 20:37:13 -05:00
binwiederhier
a4529617cc Make upgrade banner bigger 2023-01-09 17:56:51 -05:00
binwiederhier
a6564fb43c Add "expires" stuff to message cache migration 2023-01-09 16:21:00 -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
df512d0ba2 Add todo 2023-01-07 13:23:45 -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
a51d95743a Reject reservation limits in endpoint 2023-01-05 21:15:10 -05:00
binwiederhier
1e7dd8fc80 TODOs 2023-01-05 20:43:36 -05:00
binwiederhier
7fa63c8e19 Prune excess tokens per user 2023-01-05 20:22:34 -05:00
binwiederhier
60f1882bec Startup queries, foreign keys 2023-01-05 15:20:44 -05:00
binwiederhier
3280c2c440 Upgrade banner 2023-01-04 22:47:12 -05:00
binwiederhier
a91da7cf2c Reserved topic stuff 2023-01-04 20:34:22 -05:00
binwiederhier
4b9d40464c Replace read/write flags with Permission 2023-01-02 21:12:42 -05:00
binwiederhier
1733323132 Introduce Reservation 2023-01-02 20:08:37 -05:00
binwiederhier
2267d27c9b User-owned ACL entries 2023-01-01 15:21:43 -05:00
binwiederhier
bd86e3d951 Basic user access endpoint 2022-12-30 14:20:48 -05:00
binwiederhier
b131d676c4 Gradient header 2022-12-30 10:31:52 -05:00
binwiederhier
036f08a729 Make homepage slightly nicer looking 2022-12-29 21:53:41 -05:00
binwiederhier
f4ffcebb14 User database migration 2022-12-29 13:08:47 -05:00
binwiederhier
bd2ec7b2af More manager tests 2022-12-29 11:09:45 -05:00
binwiederhier
57814cf855 Tests 2022-12-29 09:57:42 -05:00
binwiederhier
66cb35b5fc Translations 2022-12-29 08:20:53 -05:00
binwiederhier
9be8be49ef Translations 2022-12-29 02:32:05 -05:00
binwiederhier
3512db1fe7 Test account api (WIP) 2022-12-28 22:16:11 -05:00
binwiederhier
367d024a2d Simplify API endpoints; add endpoint tests 2022-12-28 19:55:11 -05:00
binwiederhier
7ca9afad57 Account API endpoint fixes 2022-12-28 15:51:09 -05:00
binwiederhier
f79348817f More tests 2022-12-28 13:46:18 -05:00
binwiederhier
a2e474c375 Fix all the tests 2022-12-28 13:28:28 -05:00
binwiederhier
d9722a9825 Fix almost all tests 2022-12-27 22:14:14 -05:00
binwiederhier
95a8e64fbb Figure out user manager for account user 2022-12-26 21:27:07 -05:00
binwiederhier
dbd8efbf16 Todo 2022-12-25 22:30:58 -05:00
binwiederhier
2fb4bd4975 Display name sync 2022-12-25 22:29:55 -05:00
binwiederhier
7ae8049438 Extend session token from web app 2022-12-25 13:42:44 -05:00
binwiederhier
d4c7ad4beb Rename auth package to user; add extendToken feature 2022-12-25 11:41:38 -05:00
binwiederhier
3aac1b2715 Redirect UI if unauthorized API response 2022-12-24 15:51:22 -05:00
binwiederhier
1b39ba70cb Merge branch 'main' into user-account 2022-12-24 12:26:56 -05:00
binwiederhier
dd282963c3 Health API endpoint 2022-12-24 12:22:54 -05:00
binwiederhier
fb470eec79 Sign up rate limit 2022-12-24 12:10:51 -05:00
binwiederhier
7bd1c6e115 Check username taken 2022-12-24 08:15:39 -05:00
binwiederhier
92d7e5c58a Bump version 2022-12-23 08:38:45 -05:00
binwiederhier
b5e2c83fba stuff 2022-12-21 21:55:39 -05:00
binwiederhier
d982ce13f5 UI work, config.js stuff 2022-12-21 13:19:07 -05:00
binwiederhier
cc55bec521 Write stats to user table asynchronously 2022-12-20 21:18:33 -05:00
binwiederhier
2f567af80b more TODOs, IP basis section 2022-12-19 22:19:44 -05:00
binwiederhier
2b78a8cb51 Associate messages with a user 2022-12-19 21:42:36 -05:00
binwiederhier
84785b7a60 Restructure limits 2022-12-19 16:22:13 -05:00
binwiederhier
6598ce2fe4 Limits 2022-12-19 09:59:32 -05:00
binwiederhier
42e46a7c22 Limit work 2022-12-18 14:35:05 -05:00
binwiederhier
ac56fa36ba Plan stuff WIPWIPWIP 2022-12-17 15:17:52 -05:00
binwiederhier
8752680233 Account delete, mock user stats UI 2022-12-17 13:49:32 -05:00
binwiederhier
81a8efcca3 Change password, delete account, etc. 2022-12-15 22:07:04 -05:00
binwiederhier
c2f16f740b Stuff 2022-12-14 23:11:22 -05:00
binwiederhier
4bf2fb85e3 Bla 2022-12-13 15:19:40 -05:00
binwiederhier
4e4d410803 TODOs 2022-12-12 14:52:37 -05:00
Philipp Heckel
92bf7ebc52 blerp 2022-12-08 20:50:48 -05:00
Philipp Heckel
c5b6971447 OMG all the things are horrible 2022-12-07 21:26:18 -05:00
Philipp Heckel
8dcb4be8a8 Token login 2022-12-07 20:44:20 -05:00
Philipp Heckel
d499d20a9c Token stuff 2022-12-03 15:20:59 -05:00
Philipp Heckel
2772a38dae WIPWIPWIP 2022-12-02 15:37:48 -05:00
Philipp Heckel
ad860afb8b Polish async batching 2022-11-16 10:28:20 -05:00
Philipp Heckel
b4933a5645 WIP: Batch message INSERTs 2022-11-15 14:24:56 -05:00
Philipp Heckel
16ad94441b Personal preference 2022-10-08 17:58:05 -04:00
Karmanyaah Malhotra
3b29294679 minor modification to tests involving ips 2022-10-07 20:27:22 -05:00
Karmanyaah Malhotra
de2ca33700 recommended fixes [1 of 2] 2022-10-07 16:17:04 -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
Philipp Heckel
bddde5c637 Bump Go version, Generics whoooo 2022-10-01 15:50:48 -04:00
Philipp Heckel
419bfecd6f Reformatting, make update 2022-09-27 12:37:02 -04:00
Hunter Kehoe
3c5a10de17 combine attachment and icon url regex 2022-07-17 15:47:21 -06: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
10a9aca2a1 Delete expired attachments based on mod time instead of DB entry to avoid races 2022-07-08 10:00:04 -04:00
Philipp Heckel
bf8077626e Permissions of unix socket 2022-07-03 19:33:01 -04:00
Koro
ed1673beed Set socket mode after creation. 2022-07-03 17:39:08 -04:00
Philipp Heckel
113900d3eb Cache startup queries 2022-06-23 11:02:45 -04:00
Philipp Heckel
3334d84861 Fix another race, add test 2022-06-22 15:11:50 -04:00
Philipp Heckel
ed9d99fd57 "Fix" data race 2022-06-22 13:47:54 -04:00
Philipp Heckel
edfc1b78a1 Delayed message lock shorter 2022-06-21 20:07:08 -04:00
Philipp Heckel
c1f7bed8d1 Fix tests, lock topic as short as possible 2022-06-21 19:45:23 -04:00
Philipp Heckel
85f2252a77 WIP: Shorter lock, for #338 2022-06-21 19:07:27 -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
18bd3c0e55 Docs and Matrix tests 2022-06-16 11:40:56 -04:00
Philipp Heckel
ebbc2838ba Move error handling to main error handling; move matrix logic to its own file 2022-06-15 20:36:49 -04:00
Philipp Heckel
91375b2e8e Minor refactor, added GET 2022-06-15 16:03:12 -04:00
Philipp Heckel
27910772f0 Derpyderp 2022-06-14 20:43:17 -04:00
Philipp Heckel
e9f3edb76b WIP: Matrix 2022-06-13 22:07:30 -04:00
Philipp Heckel
cf0f002bfa Add version number to ntfy serve output 2022-06-12 11:54:58 -04:00
Philipp Heckel
2b42cea1a3 Allow HEAD requests for file attachments 2022-06-10 21:33:39 -04:00
Philipp Heckel
0521f19ea4 Fix docs header color; tiny other fixes with logging 2022-06-02 20:59:07 -04:00
Philipp Heckel
e12995e218 Logging in subscribe and publish command 2022-06-02 11:59:22 -04:00
Philipp Heckel
5cc0b194d3 Add --trace and --no-log-dates; add docs 2022-06-02 10:50:05 -04:00
Philipp Heckel
7845eb0124 So much logging 2022-06-01 23:24:44 -04:00
Philipp Heckel
ab955d4d1c Logging 2022-06-01 16:57:35 -04:00
Philipp Heckel
a04cf5fcb6 Merge branch 'main' into logging 2022-05-31 23:39:11 -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
Philipp Heckel
dc0e699fb5 WIP: Logging 2022-05-29 22:14:14 -04:00
Philipp Heckel
b2c2bd1e4b Remove "poll" alias for X-Poll-ID 2022-05-28 22:06:46 -04:00
Philipp Heckel
96bb357435 Polish the poll_request stuff 2022-05-27 20:30:20 -04:00
Philipp Heckel
6a43c1a126 WIP: iOS poll_request forwarder 2022-05-27 07:55:57 -04:00
Philipp Heckel
af76a2606d Support for Firebase ~poll keepalive topic that wakes up iOS devices every 20 minutes 2022-05-25 21:39:46 -04:00
Philipp Heckel
c684a39191 Fine tuning 2022-05-13 14:42:25 -04:00
Curid
9684629549 Add disable option to web-root
Closes #238
2022-05-13 17:08:07 +00:00
Philipp Heckel
edfed24c27 Make Upgrade header check for websockets case insensitive, closes #228 2022-04-29 13:23:04 -04:00
Philipp Heckel
1f6118f068 Finish up better parsing 2022-04-27 09:51:23 -04:00
Philipp Heckel
b805d49cfd Disallow HEAD/GET requests with body 2022-04-23 13:40:26 -04:00
Philipp Heckel
712c292183 More docs 2022-04-20 16:31:25 -04:00
Philipp Heckel
8900df27c9 Docs, still WIP 2022-04-19 23:26:46 -04:00
Philipp Heckel
5a9b2122c2 Make simple actions parsing work 2022-04-19 09:14:32 -04:00
Philipp Heckel
55869f551e Add ID 2022-04-17 14:29:43 -04:00
Philipp Heckel
26efd481e3 WIP Actions 2022-04-16 16:17:58 -04:00
Philipp Heckel
aba7e86cbc Attachment behavior fix for Firefox 2022-04-03 12:39:52 -04:00
Philipp Heckel
f98743dd9b Continued work on send dialog and drag and drop 2022-04-02 17:06:26 -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
03ad5dcff6 Add Allow-Origin: *, because YOLO 2022-03-25 17:17:24 -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
37d4d5d647 PUT/POST as JSON, relates to #133 2022-03-15 16:00:59 -04:00
Philipp Heckel
750be7f07e Fix content type for config.js 2022-03-11 15:56:54 -05:00
Philipp Heckel
3f978bc45f Better test messages 2022-03-10 22:58:24 -05:00
Philipp Heckel
488aeb119b Gzip static responses 2022-03-10 21:55:56 -05:00
Philipp Heckel
160c72997f Fix auth base64, fix iPhone things 2022-03-10 18:11:12 -05:00
Philipp Heckel
840cb5b182 Add server-generated /config.js; add error boundary 2022-03-09 23:28:55 -05:00
Philipp Heckel
acde2e5b6e Remove indexPage 2022-03-05 22:18:03 -05:00