Commit graph

5017 commits

Author SHA1 Message Date
Carlos Quintana
9e8ee6467c
fix: only allow api_to_cookie if is for same user (#2423) 2025-03-20 15:45:24 +01:00
Adrià Casajús
8acc48d997
Remove nex in activation email and allow to disable change linking accounts in proton (#2421) 2025-03-20 10:38:07 +00:00
Adrià Casajús
bb4d51d6e0
Preserve List-ID (#2420) 2025-03-19 15:05:25 +01:00
Adrià Casajús
3962ab5fb0
Preserve Unsubscribe header and create one that always unsubs via alias (#2419)
* Preserve original unsubs

* Preserve original behaviour in an extra header
2025-03-19 10:59:18 +01:00
Carlos Quintana
84364a1684
feat: alias restore check quota (#2418)
* feat: alias restore check quota

* Update app/dashboard/views/alias_trash.py

Co-authored-by: Adrià Casajús <acasajus@users.noreply.github.com>

* Update app/dashboard/views/alias_trash.py

Co-authored-by: Adrià Casajús <acasajus@users.noreply.github.com>

---------

Co-authored-by: Adrià Casajús <acasajus@users.noreply.github.com>
2025-03-18 11:05:09 +00:00
Carlos Quintana
a70baad478
Implement Alias Trash (#2417)
* wip: start implementing alias trash

* Added alias trash dashboard page

* test: delete_alias changes

* Format html

* fix: mailbox deletion

* feat: add delete_alias_action setting in dashboard settings

* chore: disable alias when trashing it

* Add restore tests

* Move tras/restore to alias_actions

* rename alias_actions to alias_delete

* Remove alias_actions

* Send events and alias audit log on alias restore

* feat: adapt queries to trashed alias

* chore: add metrics on alias trash actions

* fix: missing empty arg

* Add rate limit for restore and restore all

* fix: mailbox alias count

* feat: properly handle alias deletion for custom domain deletion

* chore: add error logs

* chore: update alias trash copy + change Trash location

* feat: make can_create_new_alias not take trashed aliases into account

* chore: update mailbox deletion dialog copy

---------

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2025-03-18 10:10:56 +01:00
Carlos Quintana
352be83839
deps: update flask-limiter and redis deps (#2406) 2025-03-04 09:48:38 +01:00
Carlos Quintana
78aa169c10
feat: add monitoring to job runner (#2404)
* feat: add monitoring to job runner

* feat: add proper error handling in job runner

* chore: unify newrelic metric
2025-02-27 15:42:20 +00:00
Carlos Quintana
7ecae793d7
deps: pin dkimpy to 1.0.5 to avoid py3dns dependency (#2405) 2025-02-27 15:27:32 +00:00
Carlos Quintana
1f710d3d11
fix: check api key exists before returning session (#2403) 2025-02-27 15:51:48 +01:00
Carlos Quintana
9940d04758
feat: add script to send sync user jobs (#2402) 2025-02-27 09:54:45 +01:00
Carlos Quintana
b06f6dde76
refactor: move job names to enum in constants (#2401) 2025-02-26 16:52:49 +01:00
Carlos Quintana
59957ec08b
chore: fix regex warnings on python 3.12 (#2400)
* deps: update some dependencies to fix warnings

* chore: move from sl.local to sl.lan for local development

* fix: mark string as regex

* chore: move facebook import to handler so its not global

* test: fix tests

* style: lint fixes

* test: move all .test and .local to .lan

* ci: do not use setup-python in lint
2025-02-26 15:41:50 +01:00
Carlos Quintana
f5de78f2e1
chore: add query limit to job runner (#2399) 2025-02-26 10:05:55 +01:00
Carlos Quintana
ba9ed4f956
chore: upgrade to python 3.12 (#2396)
* chore: upgrade to python 3.12

* ci: do not use setup-python

* deps: add limits dependency

* deps: remove fixed dependency to six

* chore: disable profiler in flask debug toolbar as it does not work with python3.12

* deps: specify strictyaml dependency for yacron
2025-02-26 09:33:34 +01:00
Carlos Quintana
821a080e1c
chore: upgrade to python 3.11 (#2395) 2025-02-25 15:47:14 +00:00
Carlos Quintana
abdbbe98a2
feat: job runner priorities (#2394)
* feat: job runner priorities

* chore: remove duplicate index
2025-02-25 16:28:01 +01:00
Adrià Casajús
9c3f346280
Allow several job runners to run in parallel (#2281)
* Allow several job runners to run in parallel

* Fix test

* fix: job_runner

---------

Co-authored-by: Carlos Quintana <carlos.quintana@proton.ch>
2025-02-25 15:02:51 +01:00
Adrià Casajús
7e77afa4fc
Fix: if there's an expired manual sub, extend it (#2393) 2025-02-21 14:44:31 +01:00
Adrià Casajús
a908e1cd18
Tweak lifetime command 2025-02-11 15:00:11 +01:00
Adrià Casajús
869ea8bd7d
Set mailbox verified on pre-verified email change 2025-02-11 10:53:21 +01:00
Adrià Casajús
accab2dd52
Add button to unlink from the admin panel (#2387)
* Add button to unlink from the admin panel

* format

* typo

* typo
2025-02-10 10:09:45 +00:00
Carlos Quintana
1903fa53c1
fix: allow to retrieve none getattr for request-id (#2388) 2025-02-10 09:35:11 +01:00
Carlos Quintana
1d2777c5a4
fix: add type check on create custom alias api (#2385) 2025-02-07 11:29:52 +01:00
Adrià Casajús
da93431df8
Clear new_email on verified email change (#2383) 2025-02-06 10:27:35 +01:00
Adrià Casajús
e17ae4210b
Proper check of mx domains (#2382)
* Proper check of mx domains

* Moved proton servers to config

* Added function

* Make sure we have a global dns

* Typo
2025-02-05 14:28:08 +01:00
Carlos Quintana
ffb070cd19
chore: offer version in newrelic events (#2380)
* chore: offer version in newrelic events

* chore: send version event on startup and on other services
2025-02-05 10:09:52 +00:00
Adrià Casajús
8d8ca3312a
Send event on account unlink (#2379)
* Send event on account unlink

* Move unlink to its own module
2025-02-05 09:44:42 +00:00
Adrià Casajús
b0a94acaba
Handle the case for duplicate new_email (#2378) 2025-02-04 15:35:14 +00:00
Adrià Casajús
298788fafa
Require user to be logged in for email change verification 2025-02-04 10:03:31 +01:00
Carlos Quintana
ed1662a485
chore: more index work (#2377) 2025-02-03 17:09:52 +01:00
Adrià Casajús
91e614ab50
Do not allow lifetime coupons for lifetime partneri (#2376) 2025-02-03 11:20:12 +01:00
Adrià Casajús
a609b3b312
Multi domain check (#2372)
* Accept partner and sl domains

* fix

* Fix html

* properly calculate mx_domains

* Improve custom domain admin template

* reformat
2025-01-31 16:36:35 +00:00
Carlos Quintana
bb6300944d
fix: remove duplicate EmailLog index (#2371) 2025-01-31 13:47:18 +00:00
Carlos Quintana
ff79fa020f
feat: index cleanup and add missing ones (#2369)
* feat: index cleanup and add missing ones

* chore: remove case in favour of greatest in query

* fix: do not remove mailbox->user index

* Fix test due to random ordering

* Create rollback

* Bad syntax

* fix order also

* test: fix ordering

* fix: ordering on mailboxes

---------

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2025-01-31 10:50:33 +01:00
Carlos Quintana
6f7070cae2
feat: add request_id in log (#2367)
* feat: add request_id in log

* fix: top-level import
2025-01-29 07:21:34 +00:00
Adrià Casajús
3168cbd785
Manage parse_address error 2025-01-28 12:09:36 +01:00
Adrià Casajús
e0f51453bb
Fix unsub parsing 2025-01-28 10:24:16 +01:00
Adrià Casajús
4865f0c281
Fix: allow reply-contact to be none 2025-01-27 12:51:29 +01:00
Adrià Casajús
2198784462
Hide the full connect with proton section 2025-01-27 12:35:30 +01:00
Adrià Casajús
aeee88f2c8
Prevent accounts created from partner directly to unlink 2025-01-24 14:45:27 +01:00
Adrià Casajús
c14d7e2098
Handle multiple emails in reply-to header (#2365) 2025-01-24 10:20:50 +00:00
Adrià Casajús
f4b56788d7
Extract mailbox email change into an util (#2366)
* Extract mailbox email change into an util

* Update validation mailbox

* Add tests

* extract mailbox cancel

* Use simple field
2025-01-24 10:16:04 +00:00
Adrià Casajús
f232a2af89
Refactor coupon management and send proper events (#2363)
* Refactor coupon management and send proper events

* Refactor coupon management and send proper events

* Add missing case

* Updated with comments

* Use model table names

* renamed tablename to table

* Use sqlalchemy
2025-01-23 12:36:13 +01:00
Adrià Casajús
f86197a526
Add missing rollback (#2364) 2025-01-21 14:57:42 +00:00
Adrià Casajús
2918251161
Set uv as package manager (#2361) 2025-01-20 17:12:12 +01:00
Adrià Casajús
f02ea25bab
Run actions on v* tags 2025-01-20 11:41:46 +01:00
Adrià Casajús
7c392a4893
Run actions on push tags 2025-01-20 11:38:28 +01:00
Adrià Casajús
49c5d73498
Update yacron 2025-01-17 15:43:46 +01:00
Adrià Casajús
3dd313c773
Remove poetry.lock and set boto3 back to 1.35 2025-01-17 12:22:07 +01:00