Commit Graph

653 Commits

Author SHA1 Message Date
Son Nguyen Kim
0aa3dff38b handle case pg_trgm can't be dropped when running test 2021-09-20 12:28:12 +02:00
Son Nguyen Kim
153831ed1a remove obsolete sender formats 2021-09-20 12:27:36 +02:00
Son Nguyen Kim
8b676bc4af not disable alias if ALIAS_AUTOMATIC_DISABLE is not set 2021-09-17 18:05:35 +02:00
Son Nguyen Kim
41478a5715 replace parseaddr_unicode by parse_full_address 2021-09-10 17:26:14 +02:00
Son Nguyen Kim
638e8137ec fix test 2021-09-10 17:10:05 +02:00
Son Nguyen Kim
defd7b159d Fix get_header_unicode: handle the case header contains several parts 2021-09-09 11:47:01 +02:00
Son Nguyen Kim
51578ce934 add filter by mailbox 2021-08-20 12:21:27 +02:00
Son Nguyen Kim
00b3d716b7 load pg_trgm when running test 2021-08-20 12:20:38 +02:00
Son
d9c682a23e remove sqlite everywhere, only use postgres. Do not use 5432 port to avoid conflict 2021-08-15 17:41:16 +02:00
Son
1384ccc459 remove RESET_DB config 2021-08-15 17:32:33 +02:00
Son Nguyen Kim
a13953e13f add postgres to github action 2021-08-06 08:54:24 +02:00
Son Nguyen Kim
07c912fd35 use postgres database in test instead of sqlite 2021-08-06 08:50:10 +02:00
Son Nguyen Kim
348c2271c6 fix test 2021-08-06 08:46:34 +02:00
Son Nguyen Kim
264bab965a fix test 2021-08-05 19:49:36 +02:00
Son Nguyen Kim
012c6fc3fb replace get(1) by first() 2021-08-05 19:44:56 +02:00
Son Nguyen Kim
fb29503b81 do not send bounce to IgnoreBounceSender 2021-08-02 11:33:58 +02:00
Son Nguyen Kim
d181cd49dd Sign the whole Alias Suffix Info instead of just the suffix 2021-07-19 20:14:59 +02:00
Son Nguyen Kim
e26287a4c7 Revert "disable should_disable() for now"
This reverts commit fb88654d84.
2021-07-14 12:23:02 +02:00
Son Nguyen Kim
fb88654d84 disable should_disable() for now 2021-07-13 17:24:28 +02:00
Son Nguyen Kim
183449e38b fix test 2021-07-11 15:00:47 +02:00
Son Nguyen Kim
1e4746dfe5 fix test 2021-07-11 15:00:22 +02:00
Son Nguyen Kim
f97b18e60a fill up EmailLog.alias_id when creating new EmailLog 2021-07-11 12:28:42 +02:00
Son NK
6532e0de93 Return 550 instead of 421 when rate limited. Rename greylisting to rate limit 2021-06-24 09:47:01 +02:00
Son NK
b84eb13ab5 Discard ignored email
Create IgnoredEmail model
2021-06-22 17:52:24 +02:00
Son
6bc093df3f fix test 2021-06-17 23:54:14 +02:00
Son
e14e697207 fix flake8 2021-06-17 23:24:07 +02:00
Son NK
3e1f098c79 fix test 2021-06-05 17:48:41 +02:00
Son NK
79d0ef8906 Use Postfix queue-id as log message-id 2021-06-04 17:15:59 +02:00
Son NK
62683a221a black 2021-06-02 18:48:35 +02:00
Son Nguyen Kim
b14d79c8f7
Merge pull request #496 from nbraud/pw_hash/refactor
Fix minor issues with password-handling, refactor
2021-06-02 18:33:56 +02:00
Son NK
eb2adc870a make sure only premium user can create new mailbox via API 2021-06-02 17:17:28 +02:00
nicoo
d216812f14 tests/api/auth: Use a pw showing Unicode issues 2021-05-27 22:16:07 +02:00
nicoo
f5f4d46aa4 tests/api/test_auth_login: Refactor
Have a single “login success” test, for both MFA and no-MFA cases.
No functional change to the test.
2021-05-26 19:05:26 +02:00
Son NK
73555ad524 generate mail_from during reply phase using BOUNCE_PREFIX_FOR_REPLY_PHASE 2021-05-25 17:59:40 +02:00
Son NK
ade07f9449 return empty name when name can't be decoded 2021-05-22 16:47:44 +02:00
Son NK
0039b4c301 disable an alias if the user has too many bounces recently 2021-04-16 17:57:25 +02:00
Son NK
f8540808bc remove Client.published 2021-04-06 19:46:21 +02:00
Son NK
7c1af6a265 improve should_disable(): take into account repetitive bounces 2021-04-06 17:24:06 +02:00
Son NK
be5cdc59ba fix test 2021-04-06 15:19:28 +02:00
Son NK
17cb4462e3 fix test 2021-04-01 18:17:27 +02:00
Son NK
d5de99afe9 Restore /alias/custom/new as currently used by safari 2021-03-31 14:41:32 +02:00
Son NK
1cac625a90 restore /v2/alias/custom/new as used by browser extension 2021-03-25 19:18:50 +01:00
Son NK
92acf352b6 add limiter for random alias creation 2021-03-24 17:30:05 +01:00
Son NK
71389b7e09 add limiter on custom alias page 2021-03-24 16:52:05 +01:00
Son NK
e46e3b1c01 fix test 2021-03-24 16:51:23 +01:00
Son NK
acc285abf0 remove /alias/custom/new, /v2/alias/custom/new, refactor test 2021-03-24 16:39:49 +01:00
Son NK
0c62ac4b1f set rate limit for creating alias endpoint 2021-03-24 16:26:42 +01:00
Son NK
6435d951e1 refactor test 2021-03-24 16:11:22 +01:00
Son NK
10cc61b4a0 refactor test 2021-03-24 15:54:03 +01:00
Son NK
c87fe55898 POST /api/aliases/:alias_id/contacts: return 200 and existed=true if contact is already added. 2021-03-17 20:29:34 +01:00
Son Nguyen Kim
ca4d097f14
Merge pull request #381 from TheLastProject/feature/importExportTests
Feature/import export tests
2021-03-15 15:17:58 +01:00
Sylvia van Os
e02d95216f Remove unused imports and var assignments 2021-03-13 15:46:12 +01:00
Sylvia van Os
cfe889f7b9 Format with black 2021-03-13 15:37:28 +01:00
Sylvia van Os
8800c29526 Complete import tests 2021-03-13 15:36:25 +01:00
Sylvia van Os
dcfd63eb0f Working import tests 2021-03-13 00:13:33 +01:00
Sylvia van Os
44ae20816a WIP: Import test 2021-03-10 23:08:33 +01:00
Son
cf6442cec2 Add PATCH /api/custom_domains/:custom_domain_id 2021-03-10 22:56:12 +01:00
Son
eb22a6302e rename creation -> deletion for GET /api/custom_domains/:custom_domain_id/trash 2021-03-10 22:39:33 +01:00
Son
6c2daf1bb6 add mailboxes to GET /api/custom_domains 2021-03-10 22:37:26 +01:00
Sylvia van Os
c6646d5971 Add export test 2021-03-10 22:35:04 +01:00
Son NK
819738f55c remove unused DKIM_PUBLIC_KEY_PATH, DKIM_DNS_VALUE 2021-03-08 15:14:37 +01:00
Son NK
157b7adbda improve logging 2021-03-08 12:11:47 +01:00
Son NK
39c92110cb add more fields into /api/custom_domains 2021-03-06 20:43:50 +01:00
Son
80d80657d6 remove cloudwatch params 2021-03-06 16:09:27 +01:00
Son NK
3af98026e3 refactor config: do not use eval() 2021-03-05 17:26:47 +01:00
Son NK
a536a34a0b remove unused import 2021-03-01 18:46:15 +01:00
Son NK
38790fdc84 get_alias_infos_with_pagination_v3: handle the case where an alias has 2 contacts that have no activity 2021-03-01 18:45:15 +01:00
Son NK
9030d8b543 flake8 2021-02-17 13:01:28 +01:00
Son NK
9e486fc2c0 add alias transfer 2021-02-17 12:56:28 +01:00
Son NK
01aa733fe8 fix test 2021-01-26 20:06:39 +01:00
Son NK
4a91db8e11 rename parse_email_log_id_from_bounce -> parse_id_from_bounce 2021-01-26 09:59:22 +01:00
Son NK
013a94d1e9 fix user delete profile pic 2021-01-19 10:47:48 +01:00
Son NK
da53b7fa00 Improve should_disable() to take into account last 7 days bounces 2021-01-19 10:45:39 +01:00
Son NK
c83b146f14 Add BOUNCE_PREFIX, BOUNCE_SUFFIX config 2021-01-11 14:51:29 +01:00
Son NK
2b4dc3cdcc when a custom domain is default and has random_prefix_generation enabled, use the random_prefix as the first choice 2021-01-02 18:17:53 +01:00
Son NK
c252665e46 flake8 2020-12-31 14:40:43 +01:00
Son NK
33dd6083c7 rename available_suffixes_more_info -> get_available_suffixes 2020-12-31 14:27:04 +01:00
Son NK
5a3b79b4cf replace available_suffixes by available_suffixes_more_info 2020-12-31 14:25:44 +01:00
Son NK
75d1b090cd rename default_random_alias_public_domain_id -> default_alias_public_domain_id 2020-12-31 14:14:56 +01:00
Son NK
b9d8f11f2d put the default domain to top 2020-12-31 13:59:03 +01:00
Son NK
b3d1085e0c fix test 2020-12-18 16:52:03 +01:00
Son NK
10f15f78c8 optimize import 2020-12-18 16:25:30 +01:00
Son NK
8111beb6ff refactoring test 2020-12-18 16:24:38 +01:00
Son NK
091ff3ad2c Add decode_text() 2020-12-18 10:43:06 +01:00
Son NK
3a8cdce650 Create should_disable 2020-12-16 18:50:09 +01:00
Son NK
6eaeb1fcf6 update coinbase webhook 2020-12-14 11:36:34 +01:00
Son NK
7094a0b694 remove unused var 2020-12-13 19:31:16 +01:00
Son NK
43a021dd88 send a reminder when a coinbase subscription is ending soon 2020-12-13 19:18:58 +01:00
Son NK
b00841f679 add /coinbase to handle Coinbase callback 2020-12-13 19:18:23 +01:00
Son Nguyen Kim
bf139f83b3
Merge pull request #342 from herrboyer/linting
Linting
2020-12-07 17:45:50 +01:00
Renaud Boyer
5d948faf56 black 2020-12-06 22:11:58 +01:00
Son NK
ce2d68a64d take into account include_sender_in_reverse_alias when creating reverse-alias 2020-12-06 19:37:20 +01:00
Renaud Boyer
0d535c8765 linting 2020-12-06 17:54:54 +01:00
Renaud Boyer
6945cb633d linting 2020-12-06 17:49:26 +01:00
Renaud Boyer
079e548ab7 linting 2020-12-06 17:48:24 +01:00
Renaud Boyer
7bcc72cc02 linting 2020-12-06 17:47:37 +01:00
Renaud Boyer
f360488eca linting 2020-12-06 17:47:05 +01:00
Renaud Boyer
0f48121fd5 linting 2020-12-06 17:46:10 +01:00
Renaud Boyer
d88aeeab7f linting 2020-12-06 17:45:07 +01:00
Renaud Boyer
6b416bcbbe linting 2020-12-06 14:51:13 +01:00
Renaud Boyer
99b4fc9625 linting 2020-12-06 14:13:20 +01:00
Renaud Boyer
57ef3ac35c linting 2020-12-06 14:10:13 +01:00
Renaud Boyer
419051cdd5 linting 2020-12-06 14:05:38 +01:00
Renaud Boyer
f746d17a02 linting 2020-12-06 14:05:00 +01:00
Son NK
cefa68d392 Create replace() in email_utils 2020-11-30 15:15:13 +01:00
Son NK
0b95ca33b8 use no encoding for 8bit and binary 2020-11-30 10:49:04 +01:00
Son NK
f804332c2d refactor: create EmailEncoding enum 2020-11-30 10:48:16 +01:00
Son NK
d61f45ea86 use 7bit as default encoding 2020-11-26 17:22:17 +01:00
Son NK
e2a7061429 add get_encoding() and encode_text() 2020-11-26 17:01:05 +01:00
Son NK
609d59d23f improve logging 2020-11-25 15:20:00 +01:00
Son NK
bcdf522174 create normalize_reply_email(): handle case where reply email contains space, quote, etc 2020-11-22 13:07:09 +01:00
Son NK
a1d5b01143 make sure mailbox email is valid 2020-11-22 12:18:31 +01:00
Son NK
824a610aa6 refactor test_mailbox 2020-11-22 12:15:32 +01:00
Son NK
f069d2f083 use getaddresses to parse multiple address from To, CC header. Remove get_addrs_from_header() 2020-11-21 19:15:02 +01:00
Son NK
78ddf16c87 make sure alias name does not contain a linebreak 2020-11-20 18:39:23 +01:00
Son NK
c25a5b50f6 make sure reply_email only contain lowercase 2020-11-20 10:03:40 +01:00
Son NK
75c3fa1c11 make sure reply-email only uses ascii-encoded char 2020-11-18 15:36:39 +01:00
Son NK
5b9dc88c67 make sure alias prefix cannot be more than 40 chars 2020-11-18 10:38:35 +01:00
Son NK
319078fceb use contact email when generating reply-email 2020-11-18 10:24:39 +01:00
Son NK
e06c872bc0 add test for get_addrs_from_header() 2020-11-18 10:04:23 +01:00
Son NK
145fc9c67c Add reverse_alias_address to GET /api/aliases/:alias_id/activities 2020-11-17 09:27:30 +01:00
Son NK
aada12f17e return reverse_alias_address in POST /api/aliases/:alias_id/contacts and GET /api/aliases/:alias_id/contacts 2020-11-16 19:39:00 +01:00
Son NK
9154b4656d refactor: create is_reply_email() 2020-11-16 19:22:19 +01:00
Son NK
75ba1669e0 Create generate_reply_email() and refactor 2020-11-16 19:15:09 +01:00
Son NK
15a6d9630a Handle sender_format in PATCH /api/setting 2020-11-15 19:43:37 +01:00
Son NK
c794e73abd Add EnumE.has_name(), EnumE.get_value() 2020-11-15 19:43:01 +01:00
Son NK
f0f81930bc Return "sender_format" in GET /api/setting 2020-11-15 19:35:07 +01:00
Son NK
dec7969ead add tests.utils.pretty() 2020-11-15 19:34:13 +01:00
Son NK
d8c9078708 Add EnumE.get_name() 2020-11-15 19:34:00 +01:00
Son NK
aee917a3ef Add GET /api/custom_domains/:custom_domain_id/trash 2020-11-15 19:24:54 +01:00
Son NK
de495b9afe return nb_alias in GET /api/custom_domains 2020-11-15 19:13:00 +01:00
Son NK
9d24b1b88a GET /api/custom_domains 2020-11-15 19:09:25 +01:00
Son NK
f6568aca6a Return pinned in GET /api/aliases/:alias_id, GET /api/v2/aliases 2020-11-15 19:01:11 +01:00
Son NK
ae05c164c9 Support pinned in PATCH /api/aliases/:alias_id 2020-11-15 18:46:27 +01:00
Son NK
6c7018dd33 Take into account pinned alias in get_alias_infos_with_pagination_v3 2020-11-15 18:42:29 +01:00
Son NK
9cfb6d412a Add /api/v5/alias/options 2020-11-14 16:45:22 +01:00
Son NK
f452c79aec Add /v2/setting/domains 2020-11-14 16:37:36 +01:00
Son NK
632a5bbbc8 handle UnicodeEncodeError in copy() and to_bytes() 2020-11-10 16:02:19 +01:00
Son NK
e659680875 add_header() 2020-11-07 13:00:12 +01:00
Son NK
8b356eef01 remove a test that can randomly fail 2020-11-05 10:48:32 +01:00
Son NK
f4f2db0f04 use the same error structure in apple endpoints 2020-11-03 16:13:10 +01:00
Son NK
6e0394d980 fix filter not working when alias has several mailboxes 2020-11-03 15:10:57 +01:00
Son NK
4b8a2a1851 add tests for sign_data 2020-11-03 13:30:13 +01:00
Son NK
4b6368b378 make sure only verified mailbox can be used as default 2020-11-03 12:43:01 +01:00
Son NK
19ac657c1c add GET /api/v2/mailboxes 2020-11-03 12:14:13 +01:00
Son NK
5ee74c74b6 do not use url_for() in api tests 2020-11-03 12:07:48 +01:00
Son NK
273537e7ae use same mailbox format for "POST /api/mailboxes" and "GET /api/mailboxes" 2020-11-03 11:22:01 +01:00
Son NK
a989545505 make sure alias contact address is valid 2020-11-03 11:13:43 +01:00
Son NK
751cc05534 check contact address in POST /aliases/<int:alias_id>/contacts 2020-11-03 11:10:32 +01:00
Son NK
72a34e28be add is_valid_email() 2020-11-03 11:09:37 +01:00
Son NK
a890557c7f Use check_alias_prefix() to check alias prefix 2020-11-03 10:39:08 +01:00
Son NK
ec1b7dd8b8 return latest_activity=null if there's no activity in GET /api/v2/aliases 2020-11-01 12:32:20 +01:00
Son NK
92ea8de374 fix test name 2020-11-01 12:29:15 +01:00
Son NK
38ca2341bc fix mailbox query in get_alias_infos_with_pagination_v3 2020-11-01 12:24:19 +01:00
Son NK
c076c7c7f3 PATCH /api/setting 2020-10-28 17:47:26 +01:00
Son NK
12f7485cb1 Add GET /api/setting/domains 2020-10-28 17:30:57 +01:00
Son NK
77bf9537d0 Add GET /api/setting 2020-10-28 17:23:58 +01:00
Son NK
91534d3cf2 Add PATCH /api/user_info 2020-10-28 17:12:21 +01:00
Son NK
3f40e3c1cf return profile_picture_url in GET /user_info 2020-10-28 17:11:33 +01:00
Son NK
9210459a72 add pgpy
- add pgpy to poetry
- add test PGP keys to local_data
- add encrypt_file_with_pgpy()
- use randomly pgpy
2020-10-28 11:50:14 +01:00
Son NK
71be3b27f7 redirect user to dashboard when setup is done 2020-10-28 10:49:50 +01:00
Son NK
c6b6083c46 Revert "remove alias options v1,v2,v3 tests"
This reverts commit 8da14ca8ca.
2020-10-20 17:32:01 +02:00
Son NK
8da14ca8ca remove alias options v1,v2,v3 tests 2020-10-20 17:03:32 +02:00
Son NK
4a32db5b5d rename PublicDomain -> SLDomain 2020-10-15 16:51:07 +02:00
Son NK
adff510359 use PublicDomain instead if ALIAS_DOMAINS 2020-10-15 16:45:08 +02:00
Son NK
e79522b638 take into account Premium domains 2020-10-15 16:21:31 +02:00
Son NK
805e78cad1 rename email_belongs_to_alias_domains -> email_belongs_to_default_domains 2020-10-14 18:46:05 +02:00
Son NK
8dbd3c1c68 more detailed error message when an alias can't be created 2020-10-09 11:48:52 +02:00
Son NK
859bc7976e create create-alias tests when alias is already existed 2020-10-09 11:37:56 +02:00
Sylvia van Os
d8ed1cbbc3 Dedupe email address 2020-10-01 21:35:11 +02:00
Son NK
063885ccf7 Add get_mailbox_from_mail_from() 2020-09-28 17:41:16 +02:00
Son NK
d6d686c4c3 add argument commit= to create() 2020-09-28 17:40:30 +02:00
Son NK
fdedc24358 black new version 2020-08-27 10:20:48 +02:00
Son NK
17c7303fb5 add get_header_from_bounce() 2020-08-24 10:17:22 +02:00
Son NK
77bfa67402 fix delete_alias: do not use IntegrityError 2020-08-23 20:17:50 +02:00
Son NK
2f00294ba3 replace pgp_enabled by disable_pgp 2020-08-06 14:22:28 +02:00
Son NK
b3ca7d1d5b Return pgp_enabled in GET /api/v2/aliases 2020-08-04 20:11:59 +02:00
Son NK
03841693ba Return support_pgp in GET /api/v2/aliases 2020-08-04 20:09:42 +02:00
Son NK
d89e41d0e5 use user.max_spam_score if present 2020-07-23 11:11:43 +02:00
Son NK
d0776b770f add GET /api/logout 2020-07-04 12:10:04 +02:00
Son NK
0d3a3e0c48 Create POST /api/api_key 2020-07-04 11:41:31 +02:00
Son NK
5705842415 add email_utils.copy() 2020-06-12 00:02:07 +02:00
Son NK
dfe708b4fb return user email in /api/auth/mfa 2020-06-09 17:20:37 +02:00
Son NK
0002531bc0 return user email in /api/auth/login 2020-06-09 17:19:03 +02:00
Son NK
89f200fbc6 format 2020-06-03 21:32:37 +02:00
Son NK
9fc0748fcc Support setting alias name in POST /api/v3/alias/custom/new 2020-06-03 21:22:29 +02:00
Son NK
48dc0dd1cc change mailboxes to mailbox_ids 2020-06-02 20:06:32 +02:00
Son NK
d055989239 Create POST /api/v3/alias/custom/new 2020-06-02 09:33:56 +02:00
Son NK
48998ff07e return nb_alias in GET /mailboxes 2020-05-31 11:52:01 +02:00
Son NK
0530a8aab5 return creation_timestamp in GET /mailboxes 2020-05-31 11:49:53 +02:00
Son NK
78d9a88328 Add default field to GET /api/mailboxes 2020-05-27 14:18:20 +02:00
Son NK
1e03f26cfa Return whether there's more notification in GET /api/notifications 2020-05-23 22:51:00 +02:00
Son NK
dae357dd6b Add GET /api/notifications, /api/notifications/:notification_id 2020-05-23 19:54:06 +02:00
Son NK
6280512adf move get mailboxes to mailbox.py 2020-05-23 16:46:10 +02:00
Son NK
3eb6700232 user can cancel mailbox email change 2020-05-23 16:43:48 +02:00
Son NK
2f087de061 can update mailbox email 2020-05-23 16:40:28 +02:00
Son NK
a76ad0485f PUT /api/mailboxes/:mailbox_id: update mailbox 2020-05-23 16:26:26 +02:00
Son NK
5ae39c85c6 Add DELETE /api/mailboxes/:mailbox_id 2020-05-23 16:18:12 +02:00
Son NK
722bff319e add POST /api/mailboxes: create a new mailbox 2020-05-23 16:17:42 +02:00
Son NK
2fbc2c171b check domain trash when creating custom alias in api 2020-05-23 12:02:01 +02:00
Son NK
b167297808 Support disable_pgp in update alias endpoint 2020-05-16 20:51:07 +02:00
Sibren Vasse
a5f24e0227 Add more From: sender formatting options 2020-05-16 18:44:31 +02:00
Son NK
362d101bab Merge branch 'master' into multiple-mailboxes
# Conflicts:
#	app/dashboard/templates/dashboard/custom_alias.html
#	email_handler.py
#	templates/emails/com/newsletter/mobile-darkmode.html
2020-05-16 11:28:25 +02:00
Son NK
2978bfb281 Fix user cannot change personal email back and better naming.
Happens when user
- changes their personal email
- wants to change back: they can't as this email is already used as mailbox
2020-05-15 23:18:30 +02:00
Son NK
aba0a534c0 When a mailbox is deleted, only put alias that has this mailbox as single mailbox to global trash 2020-05-15 16:47:55 +02:00
Son NK
e52f2ca6de Support multiple mailboxes in custom alias page 2020-05-10 20:09:54 +02:00
Son NK
90dae2e3c8 Support mailbox_ids in PUT /api/aliases/:alias_id 2020-05-10 20:09:54 +02:00
Son NK
165d986561 add mailboxes to GET /api/v2/aliases 2020-05-10 20:09:54 +02:00
Son NK
53e04a8066 fix test 2020-05-10 10:42:18 +02:00
Son NK
b95b758692 Optimize imports 2020-05-09 20:49:38 +02:00
Son NK
d9f1fb9130 Create send_email_with_rate_control(): same as send_email() but with rate control 2020-05-09 20:43:17 +02:00
Son NK
753e82d490 Add DMARC 2020-05-03 12:01:31 +02:00
Son NK
c35fbf9797 fix test_encode_decode 2020-05-02 16:26:50 +02:00
Son NK
d32669f515 Add /api/v2/alias/custom/new 2020-05-02 16:22:17 +02:00
Son NK
72e9b52b29 Add /api/v4/alias/options 2020-05-02 16:21:18 +02:00
Son NK
9874422700 refactor custom_alias: create available_suffixes() 2020-05-02 12:34:11 +02:00
Son NK
0edcc25289 refactor verify_prefix_suffix: remove user_custom_domains param 2020-05-02 12:27:54 +02:00
Son NK
db92003e5f Anti tamper: avoid submitting any suffix 2020-05-02 12:15:03 +02:00
Son NK
ca2b177e02 fix test: use valid domain 2020-04-27 23:15:30 +02:00
Son NK
96d93c824a fix test 2020-04-27 20:22:25 +02:00
Son NK
63af3297f7 return alias name in GET /api/v2/aliases 2020-04-26 10:38:58 +02:00
Son NK
7a2fc007e8 Accept "name" in PUT /api/aliases/:alias_id 2020-04-26 10:38:16 +02:00
Son NK
a422f33323 Add GET /api/mailboxes 2020-04-25 23:42:56 +02:00
Son NK
88ddca54c1 return mailbox in GET /api/v2/aliases 2020-04-25 23:42:56 +02:00
Son NK
489153a750 Support update mailbox_id in PUT /aliases/:aliasID 2020-04-25 13:49:40 +02:00
Son NK
e50b0d5da5 implement apple_update_notification 2020-04-21 09:34:16 +02:00
Son NK
1bba38edb6 Add POST /apple/process_payment 2020-04-19 11:13:38 +02:00
Son NK
cf016caa91 Refuse disposable emails in can_be_used_as_personal_email() 2020-04-16 09:43:14 +02:00
Son NK
5d0519ed86 Add GET /api/v2/aliases 2020-04-06 22:26:35 +02:00
Son NK
afceabeef5 add Contact.new_addr() 2020-04-05 15:21:04 +02:00
Son NK
d1e5b9f9b7 set contact name, use website_email instead of website_from in alias endpoint 2020-04-05 12:58:06 +02:00
Son NK
c686767d4d Fix parseaddr_unicode: take into account email only case 2020-04-05 12:56:17 +02:00
Son NK
6c68b3cda7 Fix website_send_to: prefer using name instead of website_from 2020-04-05 12:48:59 +02:00
Son NK
5fff1e86ce Add parseaddr_unicode() 2020-04-05 12:07:40 +02:00
Son NK
4d8040c80d Add reverse_alias to GET /api/aliases/:alias_id/activities 2020-04-04 19:18:07 +02:00
Son NK
eccc8a71e9 use MAX_ACTIVITY_DURING_MINUTE instead of MIN_TIME_BETWEEN_ACTIVITY 2020-04-04 17:22:27 +02:00
Son NK
8caebc0142 Return 421 when there's too much activity on an alias or mailbox 2020-04-04 16:27:22 +02:00
Son NK
3550447a66 use BytesIO as input when encrypting 2020-04-02 21:30:36 +02:00
Son NK
4c1c02db60 Add /v3/alias/options 2020-03-29 23:13:04 +02:00
Son NK
97dff83453 return full alias info in POST /api/alias/random/new 2020-03-26 19:50:22 +01:00
Son NK
d4a32451c1 return full alias info in POST /api/alias/custom/new 2020-03-26 19:48:36 +01:00
Son NK
159aa76aae GET /api/aliases/:alias_id 2020-03-26 19:44:00 +01:00
Son NK
7d4a9efb5d set user_id when creating AliasUsedOn 2020-03-20 12:29:11 +01:00
Son NK
7f5f3e68ba make sure to set user_id when creating EmailLog 2020-03-20 09:55:52 +01:00
Son NK
6e54b4fed8 make sure to set user_id when creating contact 2020-03-20 09:54:38 +01:00
Son NK
b0f2d7b85a always return 200 in /forgot_password 2020-03-18 21:55:50 +01:00
Son NK
2079b16431 add "in_trial" to /user_info 2020-03-18 19:08:16 +01:00
Son NK
f2d5230449 Add POST /api/auth/forgot_password 2020-03-18 18:43:04 +01:00
Son NK
ba6b8d2711 return email in /user_info 2020-03-18 18:34:37 +01:00
Son NK
fbef076a14 Take into account query in GET /api/aliases 2020-03-17 19:32:45 +01:00
Son NK
0d725588ae Add DELETE /api/contacts/:contact_id 2020-03-17 19:18:26 +01:00
Son NK
2d90d35647 rename gen_email_id -> alias_id 2020-03-17 12:01:18 +01:00
Son NK
4f281bdbbb rename GenEmail -> Alias, gen_email to alias whenever possible 2020-03-17 11:51:40 +01:00
Son NK
bea870ef8b rename ForwardEmailLog to EmailLog 2020-03-17 11:10:50 +01:00
Son NK
f2d630e597 rename forward_id to contact_id 2020-03-17 11:05:53 +01:00
Son NK
17974de746 rename ForwardEmail to Contact 2020-03-17 10:56:59 +01:00
Son NK
027cbb10d9 use parseaddr instead of get_email_part 2020-03-15 22:32:48 +01:00
Son NK
6b6fca2281 use email.utils.parseaddr and formataddr instead of get_email_name 2020-03-15 22:29:53 +01:00
Son NK
f87746e071 POST /api/aliases/:alias_id/contacts 2020-03-14 12:55:38 +01:00
Son NK
d7cb5ed26e GET /api/aliases/:alias_id/contacts 2020-03-14 12:22:43 +01:00
Son NK
bfd729b889 PUT /api/aliases/:alias_id 2020-03-14 11:38:39 +01:00
Son NK
e713efee98 reformat 2020-03-13 10:34:41 +01:00
Son NK
eb66900ba3 make test more stable 2020-03-11 13:35:56 +01:00
Son NK
1098f17c0c Support note in POST /api/alias/random/new 2020-03-11 12:24:30 +01:00
Son NK
aad06f73e9 Support note in POST /api/alias/custom/new 2020-03-11 12:23:43 +01:00
Son NK
417009b3be return note in GET /api/aliases 2020-03-11 12:16:45 +01:00
Son NK
2eef010bad add pgp_utils 2020-03-08 12:51:33 +01:00
Son NK
3b454b9a80 fix test 2020-03-05 20:32:08 +01:00
Son NK
a6f4059d5d make sure to set mailbox_id when creating GenEmail 2020-03-05 17:03:07 +01:00
Son NK
ca70d26285 black format 2020-03-05 11:00:58 +01:00
Son NK
32cd2fd650 Add related endpoints for registration
POST /api/auth/register
POST /api/auth/activate
POST /api/auth/reactivate
2020-02-28 19:02:01 +07:00
Son NK
91d5d1c9ac fix test 2020-02-27 22:31:38 +07:00
Son NK
a9a5f145aa fix showing unverified mailbox when creating new alias 2020-02-21 21:59:13 +07:00
Son NK
991a76dabd fix test 2020-02-10 23:30:38 +07:00
Son NK
dec36ceeec Fix add_or_replace_header: make sure to delete all header occurrences before 2020-02-07 22:04:27 +07:00
Son NK
4c383663f4 Fix delete_header not deleting all header occurences 2020-02-07 22:04:27 +07:00
Son NK
e10981f85e able to create word-based or uuid-based in /api/alias/random/new endpoint 2020-02-07 21:30:46 +07:00
Son NK
3092536b40 add GET /api/aliases/:alias_id/activities endpoint 2020-02-05 18:57:11 +07:00
Son NK
c5dc4fec4c add POST /api/aliases/:alias_id/toggle endpoint 2020-02-05 18:28:54 +07:00
Son NK
c90a4899d2 Add DELETE /api/aliases/:alias_id endpoint 2020-02-05 18:21:17 +07:00
Son NK
14b48835ae reuse ApiKey if same device 2020-02-05 18:05:26 +07:00
Son NK
d8229102a6 add test for custom alias page 2020-02-05 17:35:38 +07:00
Son NK
40cac56986 GET /api/aliases 2020-02-04 23:26:59 +07:00
Son NK
c7903d534a use null instead of "" in /api/auth/login 2020-02-04 18:32:57 +07:00
Son NK
ad1cf3af8c fix test 2020-01-30 13:20:32 +07:00
Son NK
fc22593bf6 avoid email loop
Prevent user from adding a domain that they are using for their personal email.
2020-01-28 15:16:26 +07:00
Son NK
f93e40c6ae add test for custom_domain 2020-01-28 15:13:03 +07:00
Son NK
f76bdd8fe6 set DISABLE_REGISTRATION param to disable registration 2020-01-28 11:50:25 +07:00
Son NK
fc7a832969 add can_be_used_as_personal_email() 2020-01-25 22:40:30 +07:00
Son NK
87a348932d rename env.test to test.env 2020-01-23 09:20:41 +01:00
Son NK
bdf75951f1 support ALIAS_DOMAINS
- use verify_prefix_suffix() in /api/alias/custom/new
-
2020-01-22 10:24:17 +01:00
Son NK
d7ed0d77bd add email_belongs_to_alias_domains() to verify if an email belongs to one of the alias domains 2020-01-22 10:24:17 +01:00
Son NK
ef788f7458 add /api/auth/mfa 2020-01-20 15:00:56 +01:00
Son NK
d1734c3cf9 Create /api/auth/login 2020-01-20 14:51:28 +01:00
Son NK
f52f4c821b Add /api/user_info 2020-01-05 22:48:38 +01:00
Son NK
377e6c657d add /api/alias/random/new 2020-01-05 21:15:16 +01:00
Son NK
c6db8db4a1 Improve error message 2020-01-05 21:14:40 +01:00
Son NK
96da841062 add /api/v2/alias/options that flattens the response 2020-01-05 20:47:09 +01:00
Son NK
41329782a2 refactor dns_utils and add test_dns_utils 2020-01-05 19:02:05 +01:00
Son NK
b9908a16b2 add get_email_local_part(), get_email_domain_part() to email_utils 2019-12-30 18:18:10 +01:00
Son NK
66b7df588f Fix test due to updated wording 2019-12-30 16:01:29 +01:00
Son NK
ecdebbe569 add missing DKIM_PUBLIC_KEY_PATH 2019-12-29 10:46:00 +01:00
doanguyen
e2e9cc6b5d Implement alias generator schemes 2019-12-28 14:20:10 +01:00
Son NK
bcbe239f60 User can generate quickly a random alias 2019-12-23 15:34:02 +00:00
Son NK
a3f547fd22 rename create_custom_alias -> create_new 2019-12-22 16:34:10 +00:00
Son NK
a61b900675 Sign DKIM at app level
- add DKIM_PRIVATE_KEY_PATH param
- create email_utils.add_dkim_signature
- add DKIM signature for transactional emails
- add DKIM signature for forward & reply emails. In reply phase, only non-custom-domain emails have DKIM added.
2019-12-17 18:50:26 +02:00
Son NK
66091b4f9e replace ENABLE_SENTRY by SENTRY_DSN 2019-12-16 19:30:17 +02:00
Son NK
62e0ae27a0 move get_email_name, get_email_part to email_utils 2019-12-15 18:55:18 +02:00
Son NK
565d406227 remove new_random_alias related test 2019-12-15 18:55:18 +02:00
Son NK
e5079e48da remove can_create_new_random_alias() 2019-12-15 18:55:18 +02:00
Son NK
eba9e889bf add paddle_utils.verify_incoming_request 2019-12-15 18:55:18 +02:00
Son NK
d58f9d4c89 add new param PADDLE_PUBLIC_KEY_PATH 2019-12-15 18:55:18 +02:00
Son NK
8d60ebd456 handle the case email from header has the format "First Last <ab@cd.com>" 2019-12-15 18:55:17 +02:00
Son NK
6ddb8ee5ab fix test 2019-12-15 18:55:17 +02:00
Son NK
ef888288a6 add tests for api create custom/random alias 2019-12-15 18:55:17 +02:00
Son NK
a0c199732f fix test 2019-12-15 18:55:17 +02:00
Son NK
79ac792136 fix test 2019-12-15 18:55:16 +02:00
Son NK
ab4f5bf329 add /api/alias/options 2019-12-15 18:55:16 +02:00
Son NK
c58d9052e7 rename can_create_custom_email -> can_create_new_custom_alias, can_create_new_email -> can_create_new_random_alias 2019-12-15 18:55:16 +02:00
Son NK
5d9420a763 add EMAIL_SERVERS_WITH_PRIORITY and EMAIL_SERVERS config 2019-12-15 18:55:16 +02:00
Son NK
b59ffb94b2 Remove Stripe usage 2019-12-15 18:55:16 +02:00
Son NK
6e71541985 remove trial concept 2019-12-15 18:55:16 +02:00
Son NK
2ec89afac2 add ADMIN_EMAIL and send notif to this email 2019-12-15 18:55:15 +02:00
Son NK
1e2715f0d2 remove sendgrid 2019-12-15 18:55:15 +02:00
Son NK
9eb85abac4 remove srs 2019-12-15 18:55:15 +02:00
Son NK
75e07fff04 put original name and email to from: header 2019-12-15 18:55:15 +02:00
Son NK
6420def974 fix test 2019-12-15 18:55:13 +02:00
Son NK
6f7c99963b remove pricing2 2019-12-15 18:55:13 +02:00
Son NK
263f68ecec Change subscription model
- create subscription table
- rename plan_expiration -> trial_expiration
- remove user.plan, user.promo_codes
2019-12-15 18:55:13 +02:00
Son NK
c66f424c51 redirect to ?error=invalid_client_id|http_not_allowed|unknown_redirect_uri instead of return 400 2019-12-15 18:55:13 +02:00
Son NK
d3985e2cf3 email handler: forward phase. Todo: reply phase 2019-12-15 18:55:13 +02:00
Son NK
4c34775aa2 fix cancel button in authorization page when user is not login 2019-12-15 18:55:13 +02:00
Son NK
5ff317538c remove monthly pricing, display 20$ for monthly pricing 2019-12-15 18:55:12 +02:00
Son NK
d7d2ea04a9 replace lyra by GA 2019-12-15 18:55:12 +02:00
Son NK
78e274addf add support for response_mode(query and fragment), nonce 2019-12-15 18:55:11 +02:00
Son NK
19666b2c93 add test for code, id_token flow 2019-12-15 18:55:11 +02:00
Son NK
b2d4ac8e65 add get_response_types_from_str, response_types_to_str 2019-12-15 18:55:11 +02:00
Son NK
47109e6011 add "sub", fix test 2019-12-15 18:55:11 +02:00
Son NK
f0c4132da4 test id_token,token flow 2019-12-15 18:55:11 +02:00
Son NK
30079c895f Test id_token flow 2019-12-15 18:55:11 +02:00
Son NK
f649148a88 add test for the token flow 2019-12-15 18:55:11 +02:00
Son NK
efddc68764 add auth_time in id_token 2019-12-15 18:55:11 +02:00
Son NK
51311e9c41 use tests/env.test as env file for tests 2019-12-15 18:55:11 +02:00
Son NK
ba15837b01 add some tests for authorize page
- non-authenticated user,
- non supported flow
- authorization page displayed correctly
- code flow without openid in scope
- code flow with openid in scope
2019-12-15 18:55:11 +02:00
Son NK
08b394ea0f add User.suggested_emails 2019-12-15 18:55:10 +02:00
Son NK
d05749d577 add default-avatar and use it instead of gravatar 2019-12-15 18:55:10 +02:00
Son NK
6bf8cddbcd only SERVER_NAME in test 2019-12-15 18:55:09 +02:00
Son NK
682ac75585 add test_login 2019-12-15 18:55:09 +02:00
Son NK
067b8eef71 use .env.example in test, disable CSRF in tests 2019-12-15 18:55:09 +02:00
Son NK
c4775bd66c make sure .env.example can be used in tests/ 2019-12-15 18:55:09 +02:00