Skip to content

Verify v2 client requesting directory hosted with intermediate path elements sets subdirectory ID correctly #416

Closed

Description

@nothingmuch

If the directory is deployed behind e.g. a reverse proxy and requests are rewritten exposing the public URI with a path, the current behavior of the pj_url derivation is to replace the path in its entirety.

In some places in the code .join is used, appending the subdirectory ID but the sender uses set_path as well.

Activity

  1. self-assigned this
    on Nov 28, 2024
  2. added 5 commits that reference this issue on Dec 29, 2024
    0a35d3c
    12c280b
    b5ba0df
    4ff1bef
    df9c5b8
  3. DanGould commented on Dec 29, 2024

    @DanGould
    Member

    Fixed by #448

  4. DanGould commented on Dec 29, 2024

    @DanGould
    Member

    Because of our tangled arch this was difficult to verify even though it was probably resolved. Leaving this open until we have a proper test that a directory hosted with additional path elements beyond the host is verified as functional in the v2 flow.

  5. changed the title [-]Don't use set_path to set subdirectory ID[/-] [+]Verify v2 client requesting directory hosted with intermediate path elements sets subdirectory ID correctly[/+] on Dec 29, 2024
  6. added this to the payjoin-1.0 milestone on Jan 3, 2025
  7. arminsabouri commented on Sep 15, 2025

    @arminsabouri
    Contributor

    cc @nothingmuch please provide closing rationale

  8. nothingmuch commented on Sep 15, 2025

    @nothingmuch
    ContributorAuthor

    This issue is no longer relevant because since RFC 9540 support the directory's gateway must be /.well-known/ohttp-gateway and it doesn't make much sense to allow the directory target resource to have additional path components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions