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
{{ message }}
Repository navigation
ngclient: downloading targets fails if targetpath includes subdirectories #1571
ngclient has so far copied the legacy client decision of downloading files to the same directory structure as the repository uses. It has however removed the code that creates the directory structure.
So downloading any targets with paths like "path/to/file" will fail because the local directories do not exist.
I think this is actually a good time to get rid of this idea of using target paths as local path with directories (as it has several issues, not just that we don't create the subdirectories)... I'll take this
changed the title [-]ngclient: target directory creation is missing[/-][+]ngclient: downloading targets fails if targetpath includes subdirectories[/+]on Sep 9, 2021
I have a branch but this is in practice blocked by #1587 : The legacy tests do not include any targets with sub directories (!) and I can't be bothered to add them, will wait for #1587.
I also suppose this one makes #1576 trickier to test (as the downloads just won't work).
I think this is actually a good time to get rid of this idea of using target paths as local path with directories (as it has several issues, not just that we don't create the subdirectories)... I'll take this
@jku I am sorry I created a commit before reading this issue and noticing you are assigned to it.
I created one commit possibly solving that issue: 6f108c9, but the question remains do we want
to further support targetpaths as local paths.
What other do you mean besides this one if we consider targetpaths as local paths?
@jku I am sorry I created a commit before reading this issue and noticing you are assigned to it.
I created one commit possibly solving that issue: 6f108c9,
That's fine, I'm sure you needed to do something to test -- and we are annoyingly touching the same bits of code. We'll see how bad the merging/rebasing gets...
but the question remains do we want to further support targetpaths as local paths.
I don't want to create local directories based on a URL -- a specific TUF implementation might know that is a reasonable thing to do but I don't think the library can know that. I'm suggesting we use the whole target path (url encoded) as a filename, and then also offer a way for the client application to decide the filepath themselves (so if the client knows using target path as path is safe, it can create the directories).
Activity
jku commentedon Sep 9, 2021
I think this is actually a good time to get rid of this idea of using target paths as local path with directories (as it has several issues, not just that we don't create the subdirectories)... I'll take this
[-]ngclient: target directory creation is missing[/-][+]ngclient: downloading targets fails if targetpath includes subdirectories[/+]jku commentedon Sep 13, 2021
We might want to fix this with #1412
#1412 (comment)
jku commentedon Sep 24, 2021
I have a branch but this is in practice blocked by #1587 : The legacy tests do not include any targets with sub directories (!) and I can't be bothered to add them, will wait for #1587.
I also suppose this one makes #1576 trickier to test (as the downloads just won't work).
ngclient: Don't use target path as local path
MVrachev commentedon Sep 24, 2021
@jku I am sorry I created a commit before reading this issue and noticing you are assigned to it.
I created one commit possibly solving that issue: 6f108c9, but the question remains do we want
to further support targetpaths as local paths.
What other do you mean besides this one if we consider targetpaths as local paths?
jku commentedon Sep 27, 2021
That's fine, I'm sure you needed to do something to test -- and we are annoyingly touching the same bits of code. We'll see how bad the merging/rebasing gets...
I don't want to create local directories based on a URL -- a specific TUF implementation might know that is a reasonable thing to do but I don't think the library can know that. I'm suggesting we use the whole target path (url encoded) as a filename, and then also offer a way for the client application to decide the filepath themselves (so if the client knows using target path as path is safe, it can create the directories).
ngclient: Don't use target path as local path
ngclient: Don't use target path as local path
ngclient: Don't use target path as local path
ngclient: Don't use target path as local path