Private
Public Access
1
0

Fix clippy compilation errors: restore required imports, prefix unused variables

This commit is contained in:
2026-04-12 15:52:08 +00:00
parent 409f1a4517
commit f2c6d088c8
4 changed files with 14 additions and 10 deletions

View File

@ -8,7 +8,7 @@
use actix_web::{web, HttpRequest, HttpResponse, Responder};
use chrono::Utc;
use serde::{Deserialize, Serialize};
use tracing::{error, info};
use tracing::{error, info, warn};
use uuid::Uuid;
use super::packages::ApiResponse;
@ -18,7 +18,11 @@ use crate::packages::PackageManagerBackend;
/// Normalize and validate file paths to prevent path traversal attacks (VULN-002)
/// Returns None if path contains traversal patterns
fn validate_path_no_traversal(path: &str) -> bool {
normalize_path(path).is_some()
// Validate path - check for traversal patterns
if path.contains("..") || path.contains("//") {
return false;
}
true
}
/// System info response data