core: Validate file names read from directory variants
In a future where we pull data from remote servers, we don't want to allow path uplinks.
This commit is contained in:
1 parent
4a26be1bef
commit
aa865bbb83
3 files changed
+31
No files matched your search
@@ -236,6 +236,9 @@ do_resolve_nonroot (OstreeRepoFile *self,
|
||||
|
||||
g_variant_get_child (container, i, "(&s&s&s)",
|
||||
&name, &content_checksum, &metadata_checksum);
|
||||
|
||||
if (!ot_util_validate_file_name (name, error))
|
||||
goto out;
|
||||
|
||||
if (!ostree_repo_load_variant_checked (self->repo, OSTREE_SERIALIZED_TREE_VARIANT,
|
||||
content_checksum, &tree_contents,
|
||||
|
||||
Reference in new issue
Block a user