Commit Graph

1215 Commits

Author SHA1 Message Date
Son NK 1e03f26cfa Return whether there's more notification in GET /api/notifications 2020-05-23 22:51:00 +02:00
Son NK c47fb44c1e Pagination for contact page 2020-05-23 22:34:46 +02:00
Son NK b01c91423f display notifications. user can mark a notification as read. 2020-05-23 19:54:06 +02:00
Son NK dae357dd6b Add GET /api/notifications, /api/notifications/:notification_id 2020-05-23 19:54:06 +02:00
Son NK a2e7de0bab Add Notification model 2020-05-23 19:54:06 +02:00
Son NK dfb427e6da format 2020-05-23 19:50:36 +02:00
Son NK 9bb17533c1 no need to check for deletedAlias when changing mailbox or user email 2020-05-23 19:50:04 +02:00
Son NK adce27b88b Add DomainDeletedAlias.get_by check when creating custom alias 2020-05-23 19:49:40 +02:00
Son NK 605e8d1f23 Fix DomainDeletedAlias check in Alias.create 2020-05-23 19:48:45 +02:00
Son NK a4f8dc9c9d Use AliasInTrashError instead of DeletedAlias.get_by check when trying to create alias automatically 2020-05-23 19:45:26 +02:00
Son NK c73820920b check DomainDeletedAlias when creating new alias 2020-05-23 19:35:18 +02:00
Son NK 1d598252e7 format 2020-05-23 19:18:50 +02:00
Son NK 6fc380c0d9 remove unused imports 2020-05-23 19:18:35 +02:00
Son NK 42b3666f45 use the alias v2 format for GET /api/aliases/:alias_id, POST /api/v2/alias/custom/new, POST /api/v2/alias/random/new 2020-05-23 19:18:24 +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 95ae2ec254 Add migrate_domain_trash() to move deleted alias to the correct trash 2020-05-23 12:17:50 +02:00
Son NK 2fbc2c171b check domain trash when creating custom alias in api 2020-05-23 12:02:01 +02:00
Son NK 40ec9f44a4 check if an alias is domain trash before creating it 2020-05-23 11:51:35 +02:00
Son NK 17acaec214 save deleted alias to domain trash if it belongs to a custom domain, otherwise global trash 2020-05-23 11:49:34 +02:00
Son NK a3ff19dac4 create custom domain trash page 2020-05-23 11:48:43 +02:00
Son NK bad3c39921 Add DomainDeletedAlias to store all deleted aliases for a domain 2020-05-23 11:44:15 +02:00
Son NK a512fbc6e5 use POSTFIX_PORT instead of 25 if it's set 2020-05-21 20:43:12 +02:00
Son NK 817e4e0f87 add POSTFIX_PORT param 2020-05-21 20:43:12 +02:00
Son NK 6cc8dd548c use warning level for "emails were sent to in the last 24h" error 2020-05-21 20:07:04 +02:00
Son NK 281331bc51 use warning level for "Alias creation time expired" error 2020-05-21 20:05:54 +02:00
Son NK cb036f651d do not call lower() on signed_suffix 2020-05-20 18:23:13 +02:00
Son NK 32a9bd9095 make sure to use lowercase for mailbox email 2020-05-20 18:16:18 +02:00
Son NK 93d972df09 make sure to use lowercase for alias email 2020-05-20 18:12:14 +02:00
Son NK 2217805d8c no need to move alias to global trash when a domain is deleted 2020-05-20 10:16:55 +02:00
devStorm 4fd7bf40ab
use dt filter 2020-05-18 14:05:03 -07:00
devStorm 7bd97e13b0
fido_model -> fidos 2020-05-18 13:55:38 -07:00
devStorm ea914e0378
Rename FIDO->Fido 2020-05-18 13:54:05 -07:00
devStorm 7d1a744fe2
typo 2020-05-18 13:47:42 -07:00
devStorm 5c3d2c19c8
module level and can be prefixed 2020-05-18 13:46:13 -07:00
devStorm c0a751ff13
Put button inside the form 2020-05-18 13:45:02 -07:00
Son NK 300ece2440 pycharm format 2020-05-18 19:15:20 +02:00
Son NK e22f5d1c63 Improve wordings 2020-05-18 19:14:52 +02:00
Son Nguyen Kim 484aca1342
Merge pull request #197 from SibrenVasse/remove-reply-string
Remove reply string
2020-05-18 19:09:43 +02:00
devStorm 0a59dd5638
Activate key on enter 2020-05-18 05:27:57 -07:00
devStorm d91fbb563a
Remove debug keys 2020-05-18 05:11:54 -07:00
devStorm 45023cd775
Copywriting consistency 2020-05-18 05:10:19 -07:00
devStorm b64ed7ad63
key management page 2020-05-18 05:07:06 -07:00
devStorm 6ea17b4feb
remove debug code for sudo 2020-05-18 03:03:14 -07:00
devStorm 6509053fa8
named key 2020-05-18 02:55:41 -07:00
devStorm 0cdd0b3b07
black 2020-05-18 02:15:52 -07:00
devStorm f79eb90d2a
sudo mode 2020-05-18 02:14:40 -07:00
devStorm 35f0c094fe
black 2020-05-18 01:04:45 -07:00
devStorm 419aa95f1f
more verify 2020-05-18 01:02:58 -07:00
devStorm ec91d280bb
Verify 2020-05-18 00:08:06 -07:00
devStorm 2b8febe0b9
black 2020-05-18 00:06:24 -07:00
devStorm 9fb91c83e7
more setup 2020-05-18 00:01:27 -07:00
devStorm f2f6e13af7
DB & Setup ready for multi-keys 2020-05-17 22:05:37 -07:00
Sibren Vasse e905e151ca Create user setting for replacing reverse alias (default: false) 2020-05-17 19:40:46 +02:00
Son Nguyen Kim 1997c207ed
Merge pull request #196 from SibrenVasse/error_handling
Move api error handling to global error handler
2020-05-17 18:02:23 +02:00
Sibren Vasse 2d7bd225e9 Move api error handling to global error handler 2020-05-17 15:27:24 +02:00
Son NK 12b76dd33b Merge branch 'master' into alias-disable-pgp 2020-05-17 10:46:44 +02:00
Son NK 87d52216cb reformat 2020-05-17 10:35:11 +02:00
Son NK 20e66edbaa fix redirection to next page 2020-05-17 10:28:00 +02:00
Son NK 2e208ed505 display recovery code options on mfa and fido page 2020-05-17 10:27:20 +02:00
Son NK da4e0bf384 create /auth/recovery page 2020-05-17 10:17:52 +02:00
Son NK 043ecd4fac redirect user to recovery codes page after MFA setup. Remove all recovery codes when user is no more MFA. 2020-05-17 10:11:38 +02:00
Son NK 3f7842ed3e create /recovery_code page 2020-05-17 10:05:55 +02:00
Son NK aaa1a869ea add RecoveryCode model 2020-05-17 09:59:07 +02:00
Son NK 13bb9810b6 use can disable PGP on an alias 2020-05-16 20:51:07 +02:00
Son NK 5e6454e6de use a different class for alias toggle 2020-05-16 20:51:07 +02:00
Son NK b167297808 Support disable_pgp in update alias endpoint 2020-05-16 20:51:07 +02:00
Son NK 95213b6d85 Add alias.disable_pgp column 2020-05-16 20:51:07 +02:00
Son NK 62ed7def00 fix wording 2020-05-16 20:50:27 +02:00
Sibren Vasse a5f24e0227 Add more From: sender formatting options 2020-05-16 18:44:31 +02:00
Son NK a4d17e7afc use multiple-select instead of bootstrap-select 2020-05-16 12:17:26 +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 Nguyen Kim d97b52184e
Merge pull request #186 from SibrenVasse/dark_flash
Frontend improvements
2020-05-15 23:37:30 +02:00
Son NK 7ed77a66b2 format 2020-05-15 23:18:42 +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 ff1aa72b1d lazy load alias._mailboxes and alias.mailbox 2020-05-15 16:46:02 +02:00
Son NK 0b652cf3f8 remove AliasMailbox.user_id column 2020-05-15 16:35:57 +02:00
Son NK 355b4dc2cf remove too verbose log 2020-05-15 15:30:19 +02:00
Sibren Vasse 012bc52694 Fix formatting 2020-05-15 13:42:48 +02:00
Sibren Vasse e44d92705c Add missing last_page check (index) Move disabled class to correct element (alias_log) 2020-05-15 13:42:48 +02:00
Sibren Vasse cb269a1bbe Change pagination style 2020-05-15 13:42:48 +02:00
Son Nguyen Kim 4d87df01a3
Merge pull request #181 from developStorm/webauthn-patch-1
Auto activate WebAuthn authentication
2020-05-14 20:39:49 +02:00
Son Nguyen Kim 50cdbc2b74
Merge pull request #183 from simple-login/api-error
API Error handling for 404 and 500
2020-05-14 20:36:53 +02:00
Son Nguyen Kim 2def79e689
Merge pull request #187 from SibrenVasse/domain_check
On domain check fail, update database
2020-05-14 20:36:02 +02:00
Sibren Vasse c7530947d3 On domain check fail, update database 2020-05-14 15:05:04 +02:00
Son NK 3a1af9f424 fall back for UnicodeDecodeError 2020-05-14 13:27:04 +02:00
Son NK ee19957d5d Add 405 error 2020-05-13 23:28:00 +02:00
Son NK 5c8c741a6a API Error handling for 404 and 500 2020-05-13 22:02:38 +02:00
Son NK e6c37cad0b Handle case where data["receipt"]["in_app"] is empty 2020-05-13 21:41:34 +02:00
Son NK 2b71fee712 use warning log level for "No existing AppleSub" error 2020-05-13 21:38:25 +02:00
devStorm a9967c9a4d
Auto activate WebAuthn authentication 2020-05-11 19:17:51 -07:00
Son NK 591fee301e prettify dns page 2020-05-11 23:23:08 +02:00
Son NK 70e842789e make pages compatible with dark-theme 2020-05-11 23:22:15 +02:00
Son NK cbfeee4e28 display list of mailboxes in alias contact manager 2020-05-10 20:09:54 +02:00
Son NK 8f35290a21 fix overflow error when there are several mailboxes 2020-05-10 20:09:54 +02:00
Son NK bc55b98e12 display mailbox that a bounce affects 2020-05-10 20:09:54 +02:00
Son NK 0f09ef681c Add EmailLog.bounced_mailbox_id 2020-05-10 20:09:54 +02:00
Son NK 4b479defa8 Support alias having multiple mailboxes in forward phase 2020-05-10 20:09:54 +02:00
Son NK e704497b0f make sure prefix is not empty before submitting 2020-05-10 20:09:54 +02:00
Son NK e52f2ca6de Support multiple mailboxes in custom alias page 2020-05-10 20:09:54 +02:00
Son NK b375f87d2c User can update multiple mailboxes 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 684e8983ef Add AliasMailbox table 2020-05-10 20:09:54 +02:00
Son NK 47430725a7 improve doc 2020-05-10 20:09:54 +02:00
Son Nguyen Kim 8535853730
Merge pull request #177 from simple-login/darkmode-2
Dark mode implementation
2020-05-10 20:09:14 +02:00
doanguyen 7ef78c991f Dark mode implementation
* Using CSS variable as a solution
* The new darkmode css is now live in another file so that upgarding
dashboard.css doesn't affect the darkmode itself
* Used a naive darkmode controller by client javascript. No persistance
state is stored in the backend at the moment
2020-05-10 16:52:14 +02:00
Son NK 92cd75f14a Add DISABLE_ONBOARDING param 2020-05-10 14:43:41 +02:00
Son NK cde8452e5b Fix Google oauth_state KeyError 2020-05-10 11:34:32 +02:00
Son NK 9ddb8ff2d4 add more info to spf alert email. Set the max number of emails per 24h to 1 2020-05-10 10:37:56 +02:00
Son NK ac6d1c1106 able to set nb max alert in send_email_with_rate_control 2020-05-10 10:34:39 +02:00
Son NK 8244fa01e7 only show advanced options when spf_available 2020-05-10 09:21:55 +02:00
Son NK 0bfd6b3ec7 remove deleted_alias page 2020-05-10 09:20:08 +02:00
Son NK 526df4ea09 fix DeletedALias 2020-05-09 23:39:57 +02:00
Son NK 06c1128ee6 reformat 2020-05-09 23:12:46 +02:00
Son NK 178515dbde alert user when spf fails 2020-05-09 23:00:30 +02:00
Son NK 4e4eda4efa display enforce-SPF option. Change wording. 2020-05-09 22:29:32 +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 7fdef16f37 add SentAlert model to keep track of alert emails sent to user 2020-05-09 20:40:36 +02:00
Son Nguyen Kim b95d815e5c
Merge pull request #168 from simple-login/global-trash
Global trash
2020-05-09 18:08:51 +02:00
Son Nguyen Kim 5fa2a86f23
Merge pull request #170 from developStorm/webauthn-patch
🐛 WebAuthn bug fixes
2020-05-09 18:05:34 +02:00
Son Nguyen Kim 54b32be321
Merge pull request #174 from simple-login/spf-update
Spf update
2020-05-09 18:04:43 +02:00
Son Nguyen Kim 16d8737770
Merge pull request #171 from SibrenVasse/secure_cookie
Session cookie flags.
2020-05-09 18:03:15 +02:00
Son NK 295c2fd03f Hide the SPF toggle 2020-05-09 17:34:59 +02:00
Son NK 2d8f056e11 Fix wording 2020-05-09 17:26:26 +02:00
Son Nguyen Kim e23887bb37
Merge pull request #164 from SibrenVasse/spf
Enforce SPF
2020-05-09 14:37:09 +02:00
Sibren Vasse 001079bdc5 Enforce SPF 2020-05-09 14:15:08 +02:00
Sibren Vasse e7c3a127b8 Set samesite and secure attributes of session cookie. Enable strong session protection. 2020-05-09 14:13:37 +02:00
devStorm d236f906ad
🐛 WebAuthn bug fixes
- User may not have name
- user_verification should be discouraged to work on iOS
2020-05-08 14:21:38 -07:00
Son NK e68eab44b0 allow user who has TOTP enabled to continue using the mobile app 2020-05-08 20:23:13 +02:00
Son NK 75a28c53cf fix grammar mistake 2020-05-08 13:40:21 +02:00
Son NK ad194c46f2 remove lifetime licence in pricing page 2020-05-08 12:38:42 +02:00
Son NK cf35fe2646 Put all aliases belonging to a domain to global trash when the domain is deleted 2020-05-07 22:50:45 +02:00
Son NK 9898d85722 Put all aliases belonging to a directory to global trash when this directory is deleted 2020-05-07 22:42:39 +02:00
Son NK 7a1f944887 Put all aliases belonging to a mailbox to global trash when this mailbox is deleted 2020-05-07 22:40:53 +02:00
Son NK 0441e5e2a9 Remove DeletedAlias.user_id column 2020-05-07 22:40:30 +02:00
Son NK 5b4eafce50 fix formatting 2020-05-07 22:28:49 +02:00
Son NK 2f5a03dcad make sure to add alias into global trash when deleting it 2020-05-07 22:27:27 +02:00
Son NK 300f1d7032 Override Alias.create to check in global trash first 2020-05-07 22:23:36 +02:00
Son Nguyen Kim 18e50e4a28
Merge pull request #167 from simple-login/disable-social-login-signup
disable sign-up via social login
2020-05-07 22:02:08 +02:00
Son NK ccb30a2def disable sign-up via social login 2020-05-07 22:01:14 +02:00
Son Nguyen Kim a785e664e9
Merge pull request #165 from simple-login/same-mailbox-different-user
Same mailbox different user
2020-05-07 21:56:36 +02:00
Son NK f929f23acc return 403 if user enables FIDO 2020-05-07 21:54:36 +02:00
Son NK c85ea1538e Allow the same mailbox used by different user 2020-05-07 21:47:11 +02:00
Son NK f8e896541d replace Mailbox.email unique constraint by (email, user_id) 2020-05-07 21:46:16 +02:00
Son NK 806f7016ae fix: wrongly set alias custom_domain when custom_domain is in EMAIL_ALIAS 2020-05-07 20:48:11 +02:00
Son NK 101ab408b2 black format 2020-05-07 18:01:12 +02:00
Son NK 4709237b92 only user with can_use_fido can use fido 2020-05-07 17:58:24 +02:00
Son NK 18d62a81d1 add User.can_use_fido 2020-05-07 17:56:25 +02:00
Son NK 84c529c867 optimize import 2020-05-07 17:49:29 +02:00
Son NK fe1262686e black format 2020-05-07 17:48:44 +02:00
Son Nguyen Kim e35fb631cf
Merge pull request #159 from developStorm/master
Implement WebAuthn
2020-05-07 17:47:06 +02:00
devStorm 2290a90b09
Use try-else 9b8340f3e0 (r421465450) 2020-05-07 05:41:34 -07:00
devStorm b0c39635a5
Remove credential_id variable 2020-05-07 05:37:03 -07:00
devStorm e4895b52a0
fix SITE_URL 2020-05-07 05:34:17 -07:00
devStorm f7e3320242
model - fido_enabled 2020-05-07 05:32:52 -07:00
devStorm 9b8340f3e0
Black formatted 2020-05-07 02:53:28 -07:00
devStorm 0052dad13e
Do not show full error msg to user 2020-05-07 02:48:56 -07:00
devStorm 282cbe25a3
Calculate RP_ID in config 2020-05-07 02:39:30 -07:00
devStorm c38b3c768c
fix SimpleLogin brand name 2020-05-07 02:34:19 -07:00
devStorm 3ab3f819b7
Make RP_ID a constant 2020-05-07 02:33:24 -07:00
devStorm b8b1313db9
typo 'infomation' 2020-05-07 02:31:42 -07:00
Son NK 16de59a9f5 mailbox can be other user's email 2020-05-06 12:34:52 +02:00
Son NK 35b1972730 increase the expired alias creation session to 600 secs 2020-05-06 10:10:47 +02:00
Son NK d9e9a54082 add more info in "alias expire" error 2020-05-06 10:09:17 +02:00
Son NK e9d03d1d4b Handle the case where a deleted mailbox verification link is clicked 2020-05-06 10:06:05 +02:00
devStorm ced02a8f20
remove debug code 2020-05-05 14:26:26 -07:00
devStorm fc001cfc24
fix exception handling 2020-05-05 14:13:01 -07:00
devStorm 370b71ebd3
Setting page options 2020-05-05 05:28:27 -07:00
devStorm 9da6054ec0
Allow to use either OTP or FIDO for 2FA 2020-05-05 05:16:33 -07:00
devStorm 650d6e35f0
FIDO login middleware 2020-05-05 05:03:29 -07:00
Son NK 103418dff7 Strip off http:// or https:// prefix in domain 2020-05-05 12:46:32 +02:00
Son NK 3eb904c882 set max length for domain 2020-05-05 12:46:11 +02:00
devStorm 286b1143ca
Store sign count 2020-05-05 03:16:52 -07:00
devStorm 705941b8b8
Unlink security key 2020-05-05 02:20:52 -07:00
devStorm a32b69078f
Key registration (Backend) 2020-05-05 01:58:42 -07:00
devStorm 3ce4dfb371
Security key setup page (front-end) 2020-05-05 01:32:49 -07:00
Sibren Vasse 0e4799030d Add default alias name to custom domain 2020-05-03 19:35:02 +02:00
Son NK 4ca6b02047 fix DKIM cname check 2020-05-03 12:48:42 +02:00
Son NK 753e82d490 Add DMARC 2020-05-03 12:01:31 +02:00
Son NK a270987f70 Add CustomDomain.dmarc_verified column 2020-05-03 11:51:22 +02:00
Son NK 6a42673229 remove the copy button, use CNAME for DKIM 2020-05-03 11:19:14 +02:00
Son NK 625def2367 use 2-column layout for api key, domain, directory, mailbox 2020-05-03 10:48:21 +02:00
Son NK 8a147e36a7 create how-to-use section for api key, domain, directory, mailbox 2020-05-03 10:47:29 +02:00
Son NK fe73005d49 fix referral display on mobile 2020-05-03 10:46:35 +02:00
Son NK eff0eb9e32 can delete referral 2020-05-02 18:14:09 +02:00
Son NK 1667356742 User can update/create referral name 2020-05-02 18:11:10 +02:00
Son NK 3ce3a05c7b Add referral name 2020-05-02 18:08:05 +02:00
Son NK 62bec84900 Add obsolete warnings 2020-05-02 16:23:40 +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 abeb246b2c add alias suffix anti-tampering to oauth authorize 2020-05-02 12:50:19 +02:00
Son NK 9874422700 refactor custom_alias: create available_suffixes() 2020-05-02 12:34:11 +02:00
Son NK c7ebee2118 Fix suggested_emails: only return enabled aliases 2020-05-02 12:28:44 +02:00