mirror of
https://github.com/getnora-io/nora.git
synced 2026-04-12 09:10:32 +00:00
fix: resolve clippy warnings and format code
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#![allow(dead_code)]
|
||||
//! Input validation for artifact registry paths and identifiers
|
||||
//!
|
||||
//! Provides security validation to prevent path traversal attacks and
|
||||
@@ -92,7 +93,7 @@ pub fn validate_storage_key(key: &str) -> Result<(), ValidationError> {
|
||||
|
||||
// Check each segment
|
||||
for segment in key.split('/') {
|
||||
if segment.is_empty() && key != "" {
|
||||
if segment.is_empty() && !key.is_empty() {
|
||||
// Allow trailing slash but not double slashes
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user