1
0
Fork 0

Merge commit '1e5306b8203a7ebe24047910e6c690c18c6d827a' into 2fa_enforcement

Dieser Commit ist enthalten in:
Olivier Martin 2021-04-29 23:29:28 -04:00
Commit f707f86c8e
6 geänderte Dateien mit 19 neuen und 11 gelöschten Zeilen

8
Cargo.lock generiert
Datei anzeigen

@ -1572,9 +1572,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]]
name = "openssl"
version = "0.10.33"
version = "0.10.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a61075b62a23fef5a29815de7536d940aa35ce96d18ce0cc5076272db678a577"
checksum = "6d7830286ad6a3973c0f1d9b73738f69c76b739301d0229c4b96501695cbe4c8"
dependencies = [
"bitflags",
"cfg-if 1.0.0",
@ -1601,9 +1601,9 @@ dependencies = [
[[package]]
name = "openssl-sys"
version = "0.9.61"
version = "0.9.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "313752393519e876837e09e1fa183ddef0be7735868dced3196f4472d536277f"
checksum = "fa52160d45fa2e7608d504b7c3a3355afed615e6d8b627a74458634ba21b69bd"
dependencies = [
"autocfg",
"cc",

Datei anzeigen

@ -116,7 +116,7 @@ regex = { version = "1.4.5", features = ["std", "perf"], default-features = fals
data-url = "0.1.0"
# Used by U2F, JWT and Postgres
openssl = "0.10.33"
openssl = "0.10.34"
# URL encoding library
percent-encoding = "2.1.0"

Datei anzeigen

@ -58,7 +58,7 @@ fn read_git_info() -> Result<(), std::io::Error> {
// Combined version
let version = if let Some(exact) = exact_tag {
exact
} else if &branch != "master" {
} else if &branch != "main" && &branch != "master" {
format!("{}-{} ({})", last_tag, rev_short, branch)
} else {
format!("{}-{}", last_tag, rev_short)

Datei anzeigen

@ -2,6 +2,9 @@
if [ -r /etc/vaultwarden.sh ]; then
. /etc/vaultwarden.sh
elif [ -r /etc/bitwarden_rs.sh ]; then
echo "### You are using the old /etc/bitwarden_rs.sh script, please migrate to /etc/vaultwarden.sh ###"
. /etc/bitwarden_rs.sh
fi
if [ -d /etc/vaultwarden.d ]; then
@ -10,6 +13,13 @@ if [ -d /etc/vaultwarden.d ]; then
. $f
fi
done
elif [ -d /etc/bitwarden_rs.d ]; then
echo "### You are using the old /etc/bitwarden_rs.d script directory, please migrate to /etc/vaultwarden.d ###"
for f in /etc/bitwarden_rs.d/*.sh; do
if [ -r $f ]; then
. $f
fi
done
fi
exec /vaultwarden "${@}"

Datei anzeigen

@ -522,7 +522,7 @@ fn diagnostics(_token: AdminToken, ip_header: IpHeader, conn: DbConn) -> ApiResu
Ok(r) => r.tag_name,
_ => "-".to_string(),
},
match get_github_api::<GitCommit>("https://api.github.com/repos/dani-garcia/vaultwarden/commits/master") {
match get_github_api::<GitCommit>("https://api.github.com/repos/dani-garcia/vaultwarden/commits/main") {
Ok(mut c) => {
c.sha.truncate(8);
c.sha

Datei anzeigen

@ -1,4 +1,3 @@
use chrono::prelude::*;
use diesel::r2d2::{ConnectionManager, Pool, PooledConnection};
use rocket::{
http::Status,
@ -228,13 +227,12 @@ pub fn backup_database(conn: &DbConn) -> Result<(), Error> {
use std::path::Path;
let db_url = CONFIG.database_url();
let db_path = Path::new(&db_url).parent().unwrap().to_string_lossy();
let file_date = Utc::now().format("%Y%m%d_%H%M%S").to_string();
let file_date = chrono::Utc::now().format("%Y%m%d_%H%M%S").to_string();
diesel::sql_query(format!("VACUUM INTO '{}/db_{}.sqlite3'", db_path, file_date)).execute(conn)?;
}
}
Ok(())
}
}
}
/// Get the SQL Server version
pub fn get_sql_server_version(conn: &DbConn) -> String {