0
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden synced 2024-12-17 02:53:44 +01:00
bitwarden_rs/src
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
..
api redirect to admin login page when forward fails 2022-11-28 16:46:06 +01:00
db Remove get_random_64() 2022-11-13 10:03:06 +01:00
static redirect to admin login page when forward fails 2022-11-28 16:46:06 +01:00
auth.rs Update Rust version, deps and workflow 2022-11-09 22:40:00 +01:00
config.rs Merge pull request #2928 from karbobc/settings-description 2022-11-27 22:01:54 +01:00
crypto.rs Remove get_random_64() 2022-11-13 10:03:06 +01:00
error.rs Update to diesel2 2022-10-23 00:49:23 +02:00
mail.rs use static_files() for email attachments 2022-10-19 20:39:13 +02:00
main.rs redirect to admin login page when forward fails 2022-11-28 16:46:06 +01:00
ratelimit.rs Basic ratelimit for user login (including 2FA) and admin login 2021-12-22 21:48:49 +01:00
util.rs Fully remove DuckDuckGo email service. 2022-11-14 17:19:30 +01:00