-
Notifications
You must be signed in to change notification settings - Fork 278
ngclient: remove URL normalization #1483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
See also #1077 |
this is part of the "forming URLs from target paths" issue: My understanding after thinking about this a bit too much is that target paths are meant to be URL-encoded (percent encoded) to begin with -- or at least the client library cannot know what to encode/decode. The library should not encode or unencode but client (caller) can do that if they know what they are doing. So:
|
Can I take this, please? |
As a target path is a URL path it's not correct to consider it as interchangeable with a filepath within every operation system. The unquote is also removed as the ngclient cannot assume correctly which encoding is intended and which not Fixes theupdateframework#1483 Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
As a target path is a URL path it's not correct to consider it as interchangeable with a filepath within every operation system. The unquote is also removed as the ngclient cannot assume correctly which encoding is intended and which not Fixes theupdateframework#1483 Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
As a target path is a URL path it's not correct to consider it as interchangeable with a filepath within every operation system. The unquote is also removed as the ngclient cannot assume correctly which encoding is intended and which not Fixes theupdateframework#1483 Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
As a target path is a URL path it's not correct to consider it as interchangeable with a filepath within every operation system. The unquote is also removed as the ngclient cannot assume correctly which encoding is intended and which not Fixes theupdateframework#1483 Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
As a target path is a URL path it's not correct to consider it as interchangeable with a filepath within every operation system. The unquote is also removed as the ngclient cannot assume correctly which encoding is intended and which not Fixes theupdateframework#1483 Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
As a target path is a URL path it's not correct to consider it as interchangeable with a filepath within every operation system. The unquote is also removed as the ngclient cannot assume correctly which encoding is intended and which not Fixes theupdateframework#1483 Signed-off-by: Ivana Atanasova <iyovcheva@iyovcheva-a02.vmware.com>
Description of issue or feature request:
Document that URL is expected to be is a percent encoded URL throughout the client code and remove URL string normalization in lower level methods like the one in:
https://github.com/theupdateframework/tuf/blob/745a8f7680c69ea290d48bc5a2066dd4ad9781d3/tuf/ngclient/_internal/download.py#L88
The text was updated successfully, but these errors were encountered: