Repository navigation
Handle bad key configuration - #617
Closed
spacebear21 wants to merge 3 commits into
Closed
spacebear21 wants to merge 3 commits into
spacebear21 wants to merge 3 commits into
Conversation
This whole module is feature-gated behind "v2" already.
The `process_res` methods across send and receive have a lot of shared code that can be extracted into reusable functions. `process_get_res` and `process_post_res` essentially do the same thing, and could conceivably be combined into one function. They were kept separate because "202 Accepted" is not a valid response for POST requests.
Clients with bad OHTTP key configurations should not retry requests to the directory with the same key configuration, so they must be able to switch on that error variant.
Collaborator
Pull Request Test Coverage Report for Build 14181755436Details
💛 - Coveralls |
Member
|
@spacebear21 and I discussed this. From what I recall, it does make sense to handle a bad key configuration during the initial session initialization but not thereafter, since the KeyConfiguration should only be used if it's supposed to be valid for the duration of the payjoin expiry period. How to handle #615 is still unclear but the first two commits here seem like improved changes and should land. |
Collaborator
Author
|
The first commit has already landed in master. Second commit moved to #660. Closing this 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Address #615
This is still a draft because I noticed some related issues that must be addressed first:
process_responsemethods return inconsistent error types when POSTing vs. GETting, specifically:EncapsulationErrorvs.ResponseErrorfor send andSessionErrorvs.Errorfor receive.InternalEncapsulationErrorandInternalSessionError.EncapsulationErroris a misnomer since it afaict it's exclusively raised when decapsulating responses.Hpkevariant has nothing to do with en/decapsulation.