core: validate socket path with path_is_valid()
This commit is contained in:
@@ -360,6 +360,9 @@ static int bus_socket_set_transient_property(
|
||||
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unknown Socket type: %s", t);
|
||||
|
||||
if (p->type != SOCKET_SOCKET) {
|
||||
if (!path_is_valid(p->path))
|
||||
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid socket path: %s", t);
|
||||
|
||||
p->path = strdup(a);
|
||||
path_simplify(p->path, false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user