mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-30 16:17:25 +00:00
fix: add path traversal check in service_logs get_log_file endpoint (#8605)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
9bcda7023f
commit
5f2d3e6812
@@ -97,6 +97,9 @@ async fn get_log_file(
|
|||||||
|
|
||||||
require_devops_role(&db, &email).await?;
|
require_devops_role(&db, &email).await?;
|
||||||
let path = path.to_path();
|
let path = path.to_path();
|
||||||
|
if path.contains("..") {
|
||||||
|
return Err(Error::BadRequest("Invalid path".to_string()));
|
||||||
|
}
|
||||||
#[cfg(feature = "parquet")]
|
#[cfg(feature = "parquet")]
|
||||||
let s3_client = windmill_object_store::get_object_store().await;
|
let s3_client = windmill_object_store::get_object_store().await;
|
||||||
#[cfg(feature = "parquet")]
|
#[cfg(feature = "parquet")]
|
||||||
|
|||||||
Reference in New Issue
Block a user