mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-06-13 05:37:39 +02:00
Fix error reporting in admin and some small fixes
- Fixed a bug in JavaScript which caused no messages to be shown to the user in-case of an error send by the server. - Changed mail error handling for better error messages - Changed user/org actions from a to buttons, this should prevent strange issues in-case of javascript issues and the page does re-load. - Added Alpine and Debian info for the running docker image During the mail error testing i encountered a bug which caused lettre to panic. This panic only happens on debug builds and not release builds, so no need to update anything on that part. This bug is also already fixed. See https://github.com/lettre/lettre/issues/678 and https://github.com/lettre/lettre/pull/679 Resolves #2021 Could also fix the issue reported here #2022, or at least no hash `#` in the url.
This commit is contained in:
12
src/util.rs
12
src/util.rs
@ -419,6 +419,18 @@ pub fn is_running_in_docker() -> bool {
|
||||
Path::new("/.dockerenv").exists() || Path::new("/run/.containerenv").exists()
|
||||
}
|
||||
|
||||
/// Simple check to determine on which docker base image vaultwarden is running.
|
||||
/// We build images based upon Debian or Alpine, so these we check here.
|
||||
pub fn docker_base_image() -> String {
|
||||
if Path::new("/etc/debian_version").exists() {
|
||||
"Debian".to_string()
|
||||
} else if Path::new("/etc/alpine-release").exists() {
|
||||
"Alpine".to_string()
|
||||
} else {
|
||||
"Unknown".to_string()
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Deserialization methods
|
||||
//
|
||||
|
Reference in New Issue
Block a user