fix(comms): use /attestation/check to validate chat sender#723
Merged
rickyrombo merged 1 commit intomainfrom Mar 17, 2026
Merged
fix(comms): use /attestation/check to validate chat sender#723rickyrombo merged 1 commit intomainfrom
rickyrombo merged 1 commit intomainfrom
Conversation
The POST /attestation/{handle} endpoint validates challengeId, so sending
a dummy "x" challenge now returns non-2xx and incorrectly blocks all users
from creating chats. Switch to the dedicated GET /attestation/check?wallet=
endpoint which scores users without requiring a real challenge.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7cebd1f to
33ba11e
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the comms anti-abuse-oracle (AAO) attestation validation to query by a user’s wallet address instead of handle, aligning chat abuse checks with wallet-based identity.
Changes:
- Switch AAO attestation check from a POST to
/attestation/{handle}to a GET against/attestation/check?wallet=.... - Change DB lookup used for AAO check from
users.handletousers.wallet. - Remove the now-unused
bytesimport.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+527
to
533
| var wallet string | ||
| err := pool.QueryRow(ctx, `SELECT wallet FROM users WHERE user_id = $1`, userId).Scan(&wallet) | ||
| if err != nil { | ||
| if err == pgx.ErrNoRows { | ||
| return fmt.Errorf("user %d not found", userId) | ||
| } | ||
| return err |
Comment on lines
+536
to
+537
| url := fmt.Sprintf("%s/attestation/check?wallet=%s", aaoServer, wallet) | ||
| resp, err := http.Get(url) |
Comment on lines
+537
to
538
| resp, err := http.Get(url) | ||
| if err != nil { |
raymondjacobson
approved these changes
Mar 17, 2026
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.
Summary
POST /attestation/{handle}challenge withGET /attestation/check?wallet=for the chat create abuse check/attestation/:handleendpoint now validateschallengeIdserver-side, so sending"x"returns non-2xx and incorrectly blocks all users from creating new chats/attestation/checkendpoint accepts a wallet address and returns200(allowed) or400(blocked) without needing a real challenge IDTest plan
🤖 Generated with Claude Code