Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify PATHPATTERN wildcards are glob-like
The common interpretation of PATHPATTERN's use shell-style wildcards is that they match the behaviour of a UNIX glob: https://man7.org/linux/man-pages/man7/glob.7.html However, the reference implementation currently ( https://github.com/theupdateframework/tuf/blob/04bbc03b9f16e49ee114ed9b5eae69fdea266b93/tuf/client/updater.py#L2868 ) implements PATHPATTERN wildcard matching using fnmatch ( https://docs.python.org/3/library/fnmatch.html#module-fnmatch) where, unlike a glob, wildcards in PATHPATTERN will match path separators in the PATHPATTERN. The existing recommendation in the spec to treat `/` as a directory separator implies that, like a glob, a '/' in a pathname SHOULD not be matched by a wildcard in a PATHPATTERN. Edit the description of PATHPATTERN to be explicit that this is glob-like behaviour AND we do not expect a wildcard to match a path separator. Make this even more explicit by including an examples demonstrating how a path separator would not match. Signed-off-by: Joshua Lock <[email protected]>
- Loading branch information