chore(qa): format code and configure clippy lints
This commit is contained in:
+9
-7
@@ -4,7 +4,6 @@ use std::sync::atomic::{AtomicU64, Ordering};
|
||||
use std::sync::Arc;
|
||||
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
||||
|
||||
use std::path::Path;
|
||||
use anyhow::{Context, Result};
|
||||
use bytes::{Buf, Bytes, BytesMut};
|
||||
use dav_server::{
|
||||
@@ -15,6 +14,7 @@ use dav_server::{
|
||||
},
|
||||
};
|
||||
use futures_util::stream;
|
||||
use std::path::Path;
|
||||
use tracing::{debug, error, warn};
|
||||
use zeroize::{Zeroize, Zeroizing};
|
||||
|
||||
@@ -50,7 +50,7 @@ pub const LEAK_SUFFIXES: &[&str] = &[
|
||||
".crdownload", // Google Chrome temporärer Download
|
||||
".part", // Mozilla Firefox unvollständiger Download
|
||||
".partial",
|
||||
"~", // Linux/UNIX Editor-Backups (Vim, Emacs, Gedit)
|
||||
"~", // Linux/UNIX Editor-Backups (Vim, Emacs, Gedit)
|
||||
];
|
||||
|
||||
/// Prüft, ob ein Dateiname zu den typischen Windows Explorer-, OS- oder Anwendungs-
|
||||
@@ -319,12 +319,11 @@ impl SanctumFile {
|
||||
.next_chunk_generation(self.node_id, idx)
|
||||
.unwrap_or(0);
|
||||
let (ciphertext, nonce, tag) =
|
||||
encrypt_chunk(&self.dek, self.node_id, idx, data, self.format_version, gen).map_err(
|
||||
|e| {
|
||||
encrypt_chunk(&self.dek, self.node_id, idx, data, self.format_version, gen)
|
||||
.map_err(|e| {
|
||||
error!("Verschlüsselungsfehler beim Chunk-Flush: {e}");
|
||||
FsError::GeneralFailure
|
||||
},
|
||||
)?;
|
||||
})?;
|
||||
|
||||
if let Err(e) = self.db.write_chunk_and_update_size(
|
||||
self.node_id,
|
||||
@@ -1404,7 +1403,10 @@ mod tests {
|
||||
|
||||
assert!(is_leak_file_with_custom("audit.secret_log", &custom_rules));
|
||||
assert!(is_leak_file_with_custom("debug_dump.txt", &custom_rules));
|
||||
assert!(is_leak_file_with_custom("app_temp_cache.dat", &custom_rules));
|
||||
assert!(is_leak_file_with_custom(
|
||||
"app_temp_cache.dat",
|
||||
&custom_rules
|
||||
));
|
||||
assert!(is_leak_file_with_custom("custom_exact.bin", &custom_rules));
|
||||
|
||||
// Normale Datei wird nicht blockiert
|
||||
|
||||
Reference in New Issue
Block a user