[
https://issues.apache.org/jira/browse/ZOOKEEPER-5124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated ZOOKEEPER-5124:
--------------------------------------
Labels: pull-request-available (was: )
> (C client) Chroot path validation fails to isolate namespaces
> -------------------------------------------------------------
>
> Key: ZOOKEEPER-5124
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-5124
> Project: ZooKeeper
> Issue Type: Bug
> Components: c client
> Reporter: Andrew Kyle Purtell
> Assignee: Andrew Kyle Purtell
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> On a chrooted handle, the C client would add the chroot to the client path
> before it validated the path. The check then ran on the full path only, so a
> path that did not start with "/" would be silently accepted. Also,
> {{sub_string}} would remove the chroot from server paths by length only
> rather than path component boundaries, producing incorrect results.
> The fix requires {{prepend_chroot}} return NULL for a NULL, empty, or
> relative client path on a chrooted handle. The {{isValidPath}} check of the
> caller will then return {{ZBADARGUMENTS}} as expected. `sub_string` should
> remove the chroot only on a path component boundary and return other paths
> unchanged. Sync config should use {{zoo_awgetconfig}} with a completion.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)