Description of issue or feature request:
During matching of target file path and pathpattern in ngclient/updater.py we normalize the paths by removing the leading os separator.
# Make sure to strip any leading# path separators so that a match is made.# Example: "foo.tgz" should match with "/*.tgz".iffnmatch.fnmatch(
target_filepath.lstrip(os.sep), pathpattern.lstrip(os.sep)
):
Current behavior:
Normalize file path and pathpattern in case they start with os.sep
Expected behavior:
Define a valid target file path and pathpattern strings and reject everything else.
Don't support corner cases.
Description of issue or feature request:
During matching of target file path and pathpattern in ngclient/updater.py we normalize the paths by removing the leading os separator.
Current behavior:
Normalize file path and pathpattern in case they start with
os.sepExpected behavior:
Define a valid target file path and pathpattern strings and reject everything else.
Don't support corner cases.