Skip to content

sec(gists): guarantee backend-submitted posts are always anonymous on-chain - #1062

Merged
BigBen-7 merged 1 commit into
PinSpace-Org:mainfrom
prismn:feature/anonymous-backend-posts-1040
Aug 19, 2026
Merged

sec(gists): guarantee backend-submitted posts are always anonymous on-chain#1062
BigBen-7 merged 1 commit into
PinSpace-Org:mainfrom
prismn:feature/anonymous-backend-posts-1040

Conversation

@prismn

@prismn prismn commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Guarantees that backend-submitted posts are provably anonymous (author = None) on-chain.

Changes

  • Updated GistsService.create to explicitly pass undefined (anonymous) to SorobanService.postGist.
  • Updated Swagger docs and README clarifying authorAddress is an off-chain hint.
  • Added regression unit test in gists.service.spec.ts.

Closes #1040

…us on-chain

- Ensure GistsService.create always passes author = undefined (anonymous) to SorobanService.postGist regardless of authorAddress in CreateGistDto.
- Document in CreateGistDto and Backend/README.md that authorAddress is used only as an off-chain display/filter hint, and signed posts are wallet-direct.
- Add regression unit test in gists.service.spec.ts.

Closes PinSpace-Org#1040

@BigBen-7 BigBen-7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, precise fix, prismn. Reviewed and tested locally: npm run build clean, full suite 14 suites, 125 passed + 1 todo, 0 failures.

The core change is exactly right: postGist is now hardcoded to undefined for the author regardless of what the client supplies, while the off-chain author_address DB column (display/filter hint) is preserved separately — correct separation of on-chain authority from off-chain metadata. The regression test is genuinely meaningful: it supplies an authorAddress in the DTO and asserts postGist was still called with undefined, which is the actual security property this issue asked for, not just a superficial check. DTO docs and README updated consistently.

No conflicts, no dependency issues. Approving and merging.

@BigBen-7
BigBen-7 merged commit 5b9fc3e into PinSpace-Org:main Aug 19, 2026
1 check passed
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.

Security: guarantee backend-submitted posts are always anonymous on-chain

2 participants