This repository was archived by the owner on Dec 19, 2025. It is now read-only.
Conversation
DanGould
reviewed
Mar 8, 2025
Collaborator
DanGould
left a comment
There was a problem hiding this comment.
I agree, GatewayUri makes far more sense as an abstraction over Scheme and Authority. There were so ways to misconfigure GATEWAY_ORIGIN that would not be caught until runtime, I believe this explicitly covers them with the invalid_uris test.
I'm hoping you can clear up some of my questions about the design, though I don't have any significant objections to approving this as-is.
0f44f8d to
4f0ba22
Compare
Use a non optional Scheme & Authority for representing the internal state, instead of a Uri which may be relative, and may contain a path. Authority is normalized to have an explicit port, as before. Resolution of authority to a socket addr is now async, to avoid blocking while waiting for host resolution, in anticipation of gateway opt-in allowing adversary chosen hostnames to be resolved which may be a DoS concern. Closes payjoin#51.
DanGould
approved these changes
Mar 9, 2025
Once each request handler has been spawned with its own Arc clone the interior GatewayUri can just be shared to called functions that require it by reference.
Collaborator
Author
|
Sorry for pushing another commit after approval, but this additional one makes more sense here than in the next PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use a non optional Scheme & Authority for representing the internal state, instead of a Uri which may be relative, and may contain a path.
Authority is normalized to have an explicit port, as before.
Resolution of authority to a socket addr is now async, to avoid blocking while waiting for host resolution, in anticipation of gateway opt-in allowing adversary chosen hostnames to be resolved which may be a DoS concern.
Closes #51.