Skip to content

Commit 3be818e

Browse files
authored
Merge pull request #68 from hotdata-dev/fix/path-traversal-null-bytes
fix: reject path traversal and null bytes in path resolver
2 parents b3b25a7 + 33b0035 commit 3be818e

9 files changed

Lines changed: 390 additions & 115 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/catalog.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,17 @@ impl CatalogProvider for DuckLakeCatalog {
179179
Ok(Some(meta)) => {
180180
// Resolve schema path hierarchically using path_resolver utility
181181
let schema_path =
182-
resolve_path(&self.catalog_path, &meta.path, meta.path_is_relative);
182+
match resolve_path(&self.catalog_path, &meta.path, meta.path_is_relative) {
183+
Ok(p) => p,
184+
Err(e) => {
185+
tracing::error!(
186+
error = %e,
187+
schema_name = %name,
188+
"Failed to resolve schema path"
189+
);
190+
return None;
191+
},
192+
};
183193

184194
// Pass the pinned snapshot_id to schema
185195
let schema = DuckLakeSchema::new(

0 commit comments

Comments
 (0)