Skip to content

Anonymous submissions retain submitter_handle and the API returns it #102

Description

@royalpinto007

Problem

The schema allows isAnonymous: true together with authorHandle; the handle is stored and rowToPost returns it without checking isAnonymous (only UI cards mask it). Direct API callers can store and read a handle on an "anonymous" case.

Where

app/api/posts/route.ts + lib/db/posts.ts (rowToPost) vs UI masking.

Acceptance

Add a failing test first submitting isAnonymous: true with a handle, expecting the write to strip it or the read to omit it. Then fix.

Activity

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

Metadata

Metadata

Assignees

Labels

claimedSomeone asked first and is working on thisgood first issueGood for newcomershelp wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions