Skip to content

Reduce visibility of JsonReply::new#931

Merged
arminsabouri merged 1 commit intopayjoin:masterfrom
arminsabouri:pub-crate-jsonreply-new
Aug 6, 2025
Merged

Reduce visibility of JsonReply::new#931
arminsabouri merged 1 commit intopayjoin:masterfrom
arminsabouri:pub-crate-jsonreply-new

Conversation

@arminsabouri
Copy link
Collaborator

Json replies are carefully crafted to ommit potentially sensative information. Application developers may accidentally stringify implementation errors instead of using the From ReplayableError impl if the ctor is pub.

Json replies are carefully crafted to ommit potentially sensative
information. Application developers may accidentally stringify
implementation errors instead of using the From `ReplayableError` impl.
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 16777514362

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 85.853%

Totals Coverage Status
Change from base Build 16750868059: 0.0%
Covered Lines: 7446
Relevant Lines: 8673

💛 - Coveralls

@arminsabouri arminsabouri requested a review from DanGould August 6, 2025 13:04
@nothingmuch
Copy link
Collaborator

If you don't mind please also add a unit test for JsonReply::from<ReplyableError::Implementation> not leaking, i think it can be as simple as just ensuring that the message is just "Internal server error", or for bonus cookie points implementing an error whose Display and Debug impls panic, and ensuring that those aren't triggered by JsonReply conversion

@arminsabouri arminsabouri merged commit 0aa1509 into payjoin:master Aug 6, 2025
10 checks passed
@arminsabouri arminsabouri deleted the pub-crate-jsonreply-new branch August 6, 2025 14:07
@arminsabouri
Copy link
Collaborator Author

If you don't mind please also add a unit test for JsonReply::from<ReplyableError::Implementation> not leaking, i think it can be as simple as just ensuring that the message is just "Internal server error", or for bonus cookie points implementing an error whose Display and Debug impls panic, and ensuring that those aren't triggered by JsonReply conversion

Issue created. Will tackle next

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants