Commit Graph
57 Commits
Author SHA1 Message Date
Stefan MelmukandMathijs van Veluw f96c5e8a1e filter handlebars logs 2023-10-07 16:24:21 +02:00
Stefan Melmuk 01e33a4919 csp: rename anonaddy.com to addy.io 2023-10-03 08:21:02 +02:00
Stefan Melmuk 60cbfa59bf update web-vault to v2023.8.2 2023-09-01 07:45:48 +02:00
Stefan Melmuk 33ef70c192 add minimal secretsmanager plan for web-v2023.8.x
in web-v2023.8.x the getPlans() call was changed from `/plans/` to `/plans/all`
and the create new organization form also requires a bitwardenProduct to
differentiate between plans for PasswordManager and the SecretsManager
2023-08-24 22:39:16 +02:00
Stefan Melmuk 349c97efaf update crates 2023-05-12 09:31:29 +02:00
Stefan Melmuk 8b05a5d192 update web-vault to v2023.4.2 2023-05-12 08:05:35 +02:00
Stefan Melmuk 4d5c047ddc policy data should be null not an empty object 2023-05-09 11:14:46 +02:00
Stefan Melmuk 89e94b1d91 check if reset policy is enabled 2023-04-06 22:34:05 +02:00
Stefan Melmuk 39a5f2dbe8 clear kdf memory and parallelism with pbkdf2
when changing back from argon2id to PBKDF2 the unused parameters
should be set to 0.

also fix small bug in _register
2023-03-31 07:31:40 +02:00
Stefan Melmuk 0daaa9b175 always return KdfMemory and KdfParallelism
the client will ignore the value of theses fields in case of `PBKDF2`
(whether they are unset or left from trying out `Argon2id` as KDF).

with `Argon2id` those fields should never be `null` but always in a
valid state. if they are `null` (how would that even happen?) the
client still assumes default values for `Argon2id` (i.e. m=64 and p=4)
and if they are set to something else login will fail anyway.
2023-03-31 01:10:28 +02:00
Stefan Melmuk 56cad93e0f add endpoint to bulk delete collections 2023-03-23 00:26:28 +01:00
Stefan Melmuk 3cf67e0b8d add endpoint to bulk delete groups 2023-03-23 00:26:26 +01:00
Stefan Melmuk e65fbbfc21 don't nullify key when editing emergency access
the client does not send the key on every update of an emergency access
contact so the field would be emptied on a change of the wait days or access level.
2023-02-01 23:10:09 +01:00
Stefan Melmuk d209df9e10 use a custom 404 page
to customize the 404 page you can copy the handlebar template
`src/static/templates/404.hbs` to the TEMPLATES_FOLDER (defaults to
`data/templates/`)
2022-12-05 00:08:46 +01:00
Stefan MelmukandDaniel García d5e54cb576 only check sqlite parent if there could be one 2022-12-01 22:38:59 +01:00
Stefan MelmukandDaniel García 8837660ba7 check if sqlite folder exists
instead of creating the parent folders to a sqlite database
vaultwarden should just exit if it does not.

this should fix issues like #2835 when a wrongly configured
`DATABASE_URL` falls back to using sqlite
2022-12-01 22:38:59 +01:00
Stefan Melmuk 5a13efefd3 only check sqlite parent if there could be one 2022-11-28 22:54:03 +01:00
Stefan Melmuk 2f9d7060bd check if sqlite folder exists
instead of creating the parent folders to a sqlite database
vaultwarden should just exit if it does not.

this should fix issues like #2835 when a wrongly configured
`DATABASE_URL` falls back to using sqlite
2022-11-28 22:54:02 +01:00
Stefan MelmukandBlackDex 0aa33a2cb4 don't use param for passing the redirect info
revert some changes and also rename catcher to `admin_login` to make its
function clearer

Co-authored-by: BlackDex <black.dex@gmail.com>
2022-11-28 18:21:30 +01:00
Stefan Melmuk fa7dbedd5d redirect to admin login page when forward fails
currently, if the admin guard fails the user will get a 404 page.
and when the session times out after 20 minutes post methods will
give the reason "undefined" as a response while generating the support
string will fail without any user feedback.

this commit changes the error handling on admin pages

* by removing the reliance on Rockets forwarding and making the login
  page an explicit route that can be redirected to from all admin pages

* by removing the obsolete and mostly unused Referer struct we can
  redirect the user back to the requested admin page directley

* by providing an error message for json requests the
  `get_diagnostics_config` and all post methods can return a more
  comprehensible message and the user can be alerted

* the `admin_url()` function can be simplified because rfc2616 has been
  obsoleted by rfc7231 in 2014 (and also by the recently released
  rfc9110) which allows relative urls in the Location header.

  c.f. https://www.rfc-editor.org/rfc/rfc7231#section-7.1.2 and
  https://www.rfc-editor.org/rfc/rfc9110#section-10.2.2
2022-11-28 16:46:06 +01:00
Stefan Melmuk e27a5be47a allow managers to set groups of a collection
fixes #2932
2022-11-23 15:47:45 +01:00
Stefan MelmukandDaniel García ed24d51d3e validate cron expressions on startup 2022-10-26 21:42:36 +02:00
Stefan MelmukandDaniel García 870f0d0932 validate billing_email on save 2022-10-26 21:42:36 +02:00
Stefan Melmuk 64ae5d4f81 verify email on registration via invite link
if `SIGNUPS_VERIFY` is enabled new users that have been invited have
their onboarding flow interrupted because they have to first verify
their mail address before they can join an organization.

we can skip the extra verication of the email address when signing up
because a valid invitation token already means that the email address is
working and we don't allow invited users to signup with a different
address.

unfortunately, this is not possible with emergency access invitations
at the moment as they are handled differently.
2022-10-19 22:44:17 +02:00
Stefan MelmukandDaniel García 23f1f8a576 allow registration without invite link
if signups are allowed invited users should be able to complete their
registration even when they don't have the invite link at hand.
2022-10-19 20:39:14 +02:00
0e6f6e612a use static_files() for email attachments
Apply suggestions from code review

Co-authored-by: Mathijs van Veluw <black.dex@gmail.com>
2022-10-19 20:39:13 +02:00
Stefan MelmukandDaniel García 4d1b860dad attach images to email
Set SMTP_EMBED_IMAGES option to false if you don't want to attach images
to the mail.

NOTE: If you have customized the template files `email_header.hbs` and
`email_footer.hbs` you can replace `{url}/vw_static/` to `{img_url}`
to support both URL schemes
2022-10-19 20:39:13 +02:00
Stefan MelmukandDaniel García 6576914e55 fix invitations of new users when mail is disabled
If you add a new user that has already been Invited to another
organization they will be Accepted automatically. This should not be
possible because they cannot be Confirmed until they have completed
their registration. It is also not necessary because their invitation
will be accepted automatically once they register.
2022-10-19 20:39:07 +02:00
3b9bfe55d0 use static_files() for email attachments
Apply suggestions from code review

Co-authored-by: Mathijs van Veluw <black.dex@gmail.com>
2022-10-19 20:23:24 +02:00
Stefan MelmukandDaniel García a0c6a7c0de attach images to email
Set SMTP_EMBED_IMAGES option to false if you don't want to attach images
to the mail.

NOTE: If you have customized the template files `email_header.hbs` and
`email_footer.hbs` you can replace `{url}/vw_static/` to `{img_url}`
to support both URL schemes
2022-10-19 20:23:24 +02:00
Stefan MelmukandDaniel García a2d716aec3 fix invitations of new users when mail is disabled
If you add a new user that has already been Invited to another
organization they will be Accepted automatically. This should not be
possible because they cannot be Confirmed until they have completed
their registration. It is also not necessary because their invitation
will be accepted automatically once they register.
2022-10-19 20:23:24 +02:00
Stefan MelmukandDaniel García ed6e852904 fix invitations of new users when mail is disabled
If you add a new user that has already been Invited to another
organization they will be Accepted automatically. This should not be
possible because they cannot be Confirmed until they have completed
their registration. It is also not necessary because their invitation
will be accepted automatically once they register.
2022-10-19 20:21:58 +02:00
Stefan Melmuk aa5a05960e allow registration without invite link
if signups are allowed invited users should be able to complete their
registration even when they don't have the invite link at hand.
2022-10-18 12:49:07 +02:00
Stefan Melmuk 2215cfefb9 fix invitations of new users when mail is disabled
If you add a new user that has already been Invited to another
organization they will be Accepted automatically. This should not be
possible because they cannot be Confirmed until they have completed
their registration. It is also not necessary because their invitation
will be accepted automatically once they register.
2022-10-15 16:19:26 +02:00
Stefan MelmukandMathijs van Veluw 4289663a16 use static_files() for email attachments
Apply suggestions from code review

Co-authored-by: Mathijs van Veluw <black.dex@gmail.com>
2022-10-15 04:59:33 +02:00
Stefan Melmuk ea19c2250e attach images to email
Set SMTP_EMBED_IMAGES option to false if you don't want to attach images
to the mail.

NOTE: If you have customized the template files `email_header.hbs` and
`email_footer.hbs` you can replace `{url}/vw_static/` to `{img_url}`
to support both URL schemes
2022-10-15 04:59:31 +02:00
Stefan MelmukandDaniel García 0f944ec7e2 fix link of license badge
master branch has been renamed to main.
2022-10-14 17:56:41 +02:00
Stefan MelmukandDaniel García 646186fe38 fix link of license badge
master branch has been renamed to main.
2022-10-14 17:55:59 +02:00
Stefan MelmukandDaniel García fd334e2b7d fix link of license badge
master branch has been renamed to main.
2022-10-14 17:55:27 +02:00
Stefan Melmuk 677fd2ff32 fix link of license badge
master branch has been renamed to main.
2022-10-12 20:18:18 +02:00
Stefan Melmuk 2dd5086916 more verbose permission denied error
be a bit more verbose about why a file could not be created when it is
caused by a permission denied error.
2022-10-12 01:31:10 +02:00
Stefan Melmuk 7532072d50 add check if data folder is a directory 2022-10-12 01:26:28 +02:00
Stefan MelmukandDaniel García c78d383ed1 make invitation expiration time configurable
configure the number of hours after which organization invites,
emergency access invites, email verification emails and account deletion
requests expire (defaults to 5 days or 120 hours and must be atleast 1)
2022-10-09 16:21:13 +02:00
Stefan MelmukandDaniel García 2c0742387b return CaptchaBypassToken and register object 2022-10-09 16:21:12 +02:00
Stefan MelmukandDaniel García 1704d14f29 v2022.9.2 expects a json response when registering 2022-10-09 16:21:12 +02:00
Stefan MelmukandDaniel García 2d7ffbf378 allow the removal of non-confirmed owners
ensure user_to_edit and user_to_delete are actually confirmed users,
before checking if they are the last owner of an organization.
2022-10-09 16:21:11 +02:00
Stefan MelmukandDaniel García 080e38d227 return CaptchaBypassToken and register object 2022-10-09 16:19:32 +02:00
Stefan MelmukandDaniel García 1a664fba6a v2022.9.2 expects a json response when registering 2022-10-09 16:19:32 +02:00
Stefan MelmukandDaniel García c915ef815d allow the removal of non-confirmed owners
ensure user_to_edit and user_to_delete are actually confirmed users,
before checking if they are the last owner of an organization.
2022-10-09 16:19:32 +02:00
Stefan MelmukandDaniel García 387b5eb2dd allow the removal of non-confirmed owners
ensure user_to_edit and user_to_delete are actually confirmed users,
before checking if they are the last owner of an organization.
2022-10-09 16:17:11 +02:00
Stefan Melmuk 475c7b8f16 return more descriptive JWT validation messages 2022-10-09 13:55:22 +02:00
Stefan Melmuk b70316e6d3 make invitation expiration time configurable
configure the number of hours after which organization invites,
emergency access invites, email verification emails and account deletion
requests expire (defaults to 5 days or 120 hours and must be atleast 1)
2022-10-08 18:37:16 +02:00
Stefan Melmuk 9132cc4a30 return CaptchaBypassToken and register object 2022-10-07 08:06:55 +02:00
Stefan Melmuk e50edcadfb v2022.9.2 expects a json response when registering 2022-10-07 03:00:52 +02:00
Stefan Melmuk 2685099720 allow the removal of non-confirmed owners
ensure user_to_edit and user_to_delete are actually confirmed users,
before checking if they are the last owner of an organization.
2022-09-27 10:21:23 +02:00
Stefan Melmuk 102ee3f871 add api_not_found catcher for 404 errors in /api 2022-09-25 10:59:01 +02:00
Stefan Melmuk acb5ab08a8 add not_found catcher for 404 errors 2022-09-25 04:02:16 +02:00