diff --git a/tuf/client/updater.py b/tuf/client/updater.py index 97681a3f..73dd6d08 100755 --- a/tuf/client/updater.py +++ b/tuf/client/updater.py @@ -2629,6 +2629,8 @@ def get_one_valid_targetinfo(self, target_filepath): # Raise 'securesystemslib.exceptions.FormatError' if there is a mismatch. securesystemslib.formats.RELPATH_SCHEMA.check_match(target_filepath) + target_filepath = target_filepath.replace('\\', '/') + if target_filepath.startswith('/'): raise tuf.exceptions.FormatError('The requested target file cannot' ' contain a leading path separator: ' + repr(target_filepath))