mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
sysupdate: use path_is_safe()
path_is_safe(...) is an alias of path_is_valid_full(..., false).
This commit is contained in:
@@ -1130,7 +1130,7 @@ int transfer_acquire_instance(Transfer *t, Instance *i, TransferProgress cb, voi
|
||||
|
||||
if (RESOURCE_IS_FILESYSTEM(t->target.type)) {
|
||||
|
||||
if (!path_is_valid_full(formatted_pattern, /* accept_dot_dot = */ false))
|
||||
if (!path_is_safe(formatted_pattern))
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Formatted pattern is not suitable as file name, refusing: %s", formatted_pattern);
|
||||
|
||||
t->final_path = path_join(t->target.path, formatted_pattern);
|
||||
|
||||
Reference in New Issue
Block a user