    def get_files_from_storage(paths):
        """Return S3 file where the name does not include the path."""
        for path in paths:
            path = pathlib.PurePosixPath(path)
            try:
                location = storage.aws_location
            except AttributeError:
                location = storage.location
            try:
                f = storage.open(str(path.relative_to(location)))
                f.name = path.name
                yield f
            except (OSError, ValueError):
                logger.exception("File not found: %s", path)
The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.