Commit graph

4926 commits

Author SHA1 Message Date
Adrià Casajús
dc8c44e581
Add missing eagerloads 2024-10-31 14:39:43 +01:00
Adrià Casajús
68ef8ac43d
Several cron fixes (#2296) 2024-10-31 13:20:06 +01:00
Adrià Casajús
2dc96a1d1e
Several fixes (#2291)
* Fix login timings and use secure secret for password recovery

* Run HIBP for all premium users not just paid
2024-10-30 09:58:00 +00:00
Carlos Quintana
8457a46cb3
Fix/none or object deleted crashes (#2295)
* fix: handle None-case when get_or_create contact

* chore: use already-calculated fields in order not to depend on the instance
2024-10-28 09:50:25 +01:00
Adrià Casajús
55669d57ec
Updated security.md 2024-10-25 15:36:31 +02:00
Adrià Casajús
7295a2052f
Mark if a verification code has been deleted (#2290) 2024-10-25 08:29:33 +00:00
Carlos Quintana
01d5f40580
fix: handle race condition on contact creation (#2289) 2024-10-24 08:04:54 +00:00
Carlos Quintana
d65994c3c6
fix: missing None check on alias contacts api (#2288) 2024-10-24 07:50:35 +00:00
Adrià Casajús
ccd687f091
Add job to send events to webhook (#2282)
* Add job to send events to webhook

* Apply comments

---------

Co-authored-by: Carlos Quintana <74399022+cquintana92@users.noreply.github.com>
2024-10-23 17:01:32 +02:00
Adrià Casajús
9646f84b79
Only send new alias events on user creation (#2285)
* Only send new alias events on user creation

(cherry picked from commit ab8f998dd40dc83c8f8a528a156ba50eae376aaf)

* Trigger a sync when a new partner user is created

* Improve tests

* Move it to the partner_utils

---------

Co-authored-by: Carlos Quintana <74399022+cquintana92@users.noreply.github.com>
2024-10-23 11:18:03 +02:00
Carlos Quintana
f55ab58d0c
fix: prevent mailbox disclosure (#2284) 2024-10-23 10:24:15 +02:00
Carlos Quintana
1afd392e5c
fix: crash on empty mailbox email (#2283) 2024-10-22 10:06:20 +02:00
Adrià Casajús
34575016fd
Fix error in event processing where the event is deleted before marking it as taken (#2280)
Co-authored-by: Carlos Quintana <74399022+cquintana92@users.noreply.github.com>
2024-10-21 16:13:15 +02:00
Carlos Quintana
a585a84302
chore: emit audit log for manual subscription (#2277)
* chore: emit audit log for manual subscription

* chore: emit event to event_dispatcher on manual subscription action
2024-10-21 10:21:32 +00:00
Carlos Quintana
6446f0eaa7
chore(admin): add column for user activated (#2275) 2024-10-18 16:55:58 +02:00
Carlos Quintana
67b3820f61
feat: audit log and admin panel improvements (#2274)
* feat: add deleted alias audit logs

* feat: emit event when user is created or password reset

* feat: improve admin panel
2024-10-18 13:32:26 +00:00
Carlos Quintana
2d67bf3689
feat: show audit logs on admin panel (#2273)
* feat: show audit logs on admin panel

* fix: make audit logs desc
2024-10-18 08:17:47 +00:00
Carlos Quintana
06201a517c
fix: mailbox email change verification crash (#2272) 2024-10-18 09:45:18 +02:00
Carlos Quintana
ada297ecb6
fix: make contact audit logs belong to alias (#2270) 2024-10-17 13:42:54 +00:00
Adrià Casajús
3c13f1ce20
Have the dead letter also take events to avoid race conditions (#2267)
* Have the dead letter also take events to avoid race conditions

* Ensure we take the event

* Tests for event taken

* Rename
2024-10-17 09:16:33 +00:00
Carlos Quintana
2cd6ee777f
chore: emit some missing contact audit logs (#2269)
* chore: emit some missing contact audit logs

* chore: improve alias change mailboxes audit message
2024-10-17 09:55:04 +02:00
Carlos Quintana
35f6e67053
feat: user audit log (#2266)
* feat: set up UserAuditLog

* refactor: extract payment callbacks into their own files + handle subscription user_audit_log

* feat: handle account linking for user audit log

* chore: user_audit_log for mailboxes

* chore: user_audit_log for custom domains

* chore: user_audit_log for contacts

* chore: user_audit_log for directories

* fix: do not enforce cronjob being defined in choices + enable user deletion

* chore: user_audit_log for user deletion

* refactor: change emit_user_audit_log function to receive the full user object

* feat: add user_audit_log migration

* test: fix tests

* test: add some tests for user_audit_log

* fix: spf record verification user_audit_log

* chore: add missing index to user_audit_log.created_at

* chore: add missing index to alias_audit_log.created_at
2024-10-16 16:57:59 +02:00
Adrià Casajús
b8be0f470a
Remove old webhook to send plan changes and rely on events (#2265) 2024-10-15 11:01:26 +02:00
Carlos Quintana
4986ace59f
fix: emit mailboxes change event from alias_mailbox_utils (#2264) 2024-10-15 09:39:40 +02:00
Carlos Quintana
f3ca74d9b3
chore: unify change alias mailboxes logic (#2262) 2024-10-14 20:25:17 +02:00
Carlos Quintana
bdb0c8bd08
feat: alias audit log (#2261)
* feat: alias audit log

* feat: crontab to delete old alias_audit_log entries

* Unified messages

---------

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2024-10-14 12:45:00 +02:00
Carlos Quintana
1554bea064
feat: record newrelic event for http status code (#2259) 2024-10-11 07:51:52 +00:00
Carlos Quintana
7c0db6067b
fix(admin): change alias.verified to alias.enabled (#2260) 2024-10-11 09:41:58 +02:00
Carlos Quintana
076d5108d8
feat: update sentry and ignore 416 errors (#2258)
* dep: update sentry_sdk

* feat(sentry): ignore 416 status codes
2024-10-10 15:42:54 +02:00
Adrià Casajús
8b5dc9190d
Only change the profile picture if data is sent (#2255)
* Only change the profile picture if data is sent

* Ensure email is sent

* re-use var

* Ensure email is given on login

* Remove arm from build images

* reverted login changes
2024-10-09 09:13:49 +00:00
Carlos Quintana
b269ce81e6
fix: missing branch on get_alias_recipient_name (#2254)
* fix: missing branch on get_alias_recipient_name

* test: add test for missing else branch
2024-10-09 10:46:48 +02:00
Carlos Quintana
5bc72f92d4
feat(admin): show better info for alias mailboxes (#2253)
* feat(admin): show better info for alias mailboxes

* fix: limit the amount of alias mailboxes shown
2024-10-08 17:09:09 +02:00
Carlos Quintana
9bc0c7d24d
chore: extract alias recipient name into function (#2252) 2024-10-08 12:48:53 +02:00
Adrià Casajús
eac73c4e8b
On alias transfer send the proper events (#2249) 2024-10-04 13:17:59 +00:00
Carlos Quintana
9d5697b624
chore: DNS validation improvements (#2248)
* chore: DNS validation improvements

* fix: do not show domains pending deletion

* fix: generate verification token if null

* revert: dmarc cleanup
2024-10-03 13:04:17 +02:00
Adrià Casajús
06ab116476
Fix: Allow to create mailboxes for a custom domain if they are not sl domains (#2236) 2024-10-02 13:50:51 +00:00
Carlos Quintana
b97a1dd52c
fix: improve MX and SPF domain handling (#2246)
* fix: improve MX and SPF domain handling

* fix: do not use get_instance function

* fix: legacy use of tuples instead of MxRecord

* refactor: rename partner custom domain variables
2024-10-02 15:46:10 +02:00
Carlos Quintana
ed5e62d479
fix: custom_domain deleted error (#2245) 2024-10-02 09:45:54 +02:00
Carlos Quintana
940db18383
chore: extract set_custom_domain_mailboxes from controller (#2244)
* chore: extract set_custom_domain_mailboxes from controller

* test: set_custom_domain_mailboxes

* feat: improve set_custom_domain_mailboxes performance
2024-10-01 11:25:00 +02:00
Carlos Quintana
8cbd8eb841
fix: preserve web behaviour for mailbox verify code override (#2240) 2024-09-30 12:23:58 +02:00
Carlos Quintana
6d17eaa1ec
feat: allow override mailbox verification code (#2239) 2024-09-30 11:55:12 +02:00
Carlos Quintana
80404b4dca
chore: add custom domain indices (#2238) 2024-09-30 11:52:44 +02:00
Adrià Casajús
b59ca3e47c
Move more contact creation logic to a single function (#2234)
* Move more contact creation logic to a single function

* Reordered parameters

* Fix invalid arguments
2024-09-27 16:04:32 +02:00
Carlos Quintana
4762dffd96
feat: disable whitelist events (#2230) 2024-09-27 15:55:25 +02:00
Adrià Casajús
df4c52815b
Add monitoring for app connections to the db (#2235) 2024-09-27 08:00:25 +02:00
Carlos Quintana
20c1145a1d
fix: wrong retries column name in monitoring (#2233) 2024-09-25 14:33:14 +02:00
Carlos Quintana
a3bd6969ec
chore: extract delete custom domain from controller (#2229) 2024-09-20 14:19:28 +02:00
Adrià Casajús
38d377acb3
Extract contact creation logic to an external function (#2228)
* Extract contact creation logic to an external function

* PR comments
2024-09-20 10:11:57 +02:00
Carlos Quintana
d0ba7675f0
chore: event changes (#2227)
* chore: change max_retries to 10

* chore: only send custom domain deleted event if it is not a partner domain

* chore: newrelic events metric names rename

* chore: emit failed events metric

* chore: migration for contact.flags and custom_domain.pending_deletion

* chore: mark custom_domain as pending_deletion when deleting it

* chore: add event type to metric
2024-09-19 16:20:56 +02:00
Carlos Quintana
4d359cff7a
feat: allow to define partner records (#2226)
* refactor: make config variables explicit

* refactor: make mandatory to have -verification suffix for prefix
2024-09-18 12:18:30 +02:00