Skip to content

ngclient: remove URL normalization #1483

Closed

Description

@sechkova

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

Activity

  1. joshuagl commented on Jul 6, 2021

    @joshuagl
    Member

    See also #1077

  2. added
    backlog
    good first issue
    on Jul 6, 2021
  3. jku commented on Sep 14, 2021

    @jku
    Member

    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:

    • client library code should not unquote: it cannot know what is an intended encoding and what is not
    • client library code should not replace any slashes with other slashes: it cannot know which slashes are intended and which are not
    • only exception to this would be a method that explicitly takes a local path and tries to turn that into a target path: My opinion is that we don't need a method like that: client (caller) can implement one if they think they do
  4. ivanayov commented on Nov 18, 2021

    @ivanayov
    Collaborator

    Can I take this, please?

  5. added 4 commits that reference this issue on Nov 18, 2021
    c9440dc
    ad7feb4
    6da61b6
    3407881
  6. added this to the Sprint 13 milestone on Nov 24, 2021
  7. added a commit that references this issue on Nov 25, 2021
    aa59192
  8. added a commit that references this issue on Dec 1, 2021
    8237e7b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backloggood first issuengclient

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions