You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
0 commit comments