mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-06-12 05:07:40 +02:00
Improved error messagees, implemented delete ciphers, attachments and account, implemented two factor recovery.
Known missing: - import ciphers, create ciphers types other than login and card, update ciphers - clear and put device_tokens - Equivalent domains - Organizations
This commit is contained in:
37
src/main.rs
37
src/main.rs
@ -53,7 +53,6 @@ fn init_rocket() -> Rocket {
|
||||
.mount("/identity", api::identity_routes())
|
||||
.mount("/icons", api::icons_routes())
|
||||
.manage(db::init_pool())
|
||||
.attach(DebugFairing)
|
||||
}
|
||||
|
||||
// Embed the migrations from the migrations folder into the application
|
||||
@ -66,7 +65,7 @@ fn main() {
|
||||
|
||||
// Make sure the database is up to date (create if it doesn't exist, or run the migrations)
|
||||
let connection = db::get_connection().expect("Can't conect to DB");
|
||||
embedded_migrations::run_with_output(&connection, &mut io::stdout());
|
||||
embedded_migrations::run_with_output(&connection, &mut io::stdout()).expect("Can't run migrations");
|
||||
|
||||
// Validate location of rsa keys
|
||||
if !util::file_exists(&CONFIG.private_rsa_key) {
|
||||
@ -114,37 +113,3 @@ impl Config {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct DebugFairing;
|
||||
|
||||
impl Fairing for DebugFairing {
|
||||
fn info(&self) -> Info {
|
||||
Info {
|
||||
name: "Request Debugger",
|
||||
kind: Kind::Request,
|
||||
}
|
||||
}
|
||||
|
||||
fn on_request(&self, req: &mut Request, data: &Data) {
|
||||
let uri_string = req.uri().to_string();
|
||||
|
||||
// Ignore web requests
|
||||
if !uri_string.starts_with("/api") &&
|
||||
!uri_string.starts_with("/identity") {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
for header in req.headers().iter() {
|
||||
println!("DEBUG- {:#?} {:#?}", header.name(), header.value());
|
||||
}
|
||||
*/
|
||||
|
||||
/*let body_data = data.peek();
|
||||
|
||||
if body_data.len() > 0 {
|
||||
println!("DEBUG- Body Complete: {}", data.peek_complete());
|
||||
println!("DEBUG- {}", String::from_utf8_lossy(body_data));
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user