Skip to content

bug: restrict User attributes exposed by GET /rest/memories - #336

Open
devin-ai-integration[bot] wants to merge 1 commit into
developfrom
devin/1789000439-memories-user-attrs
Open

devin-ai-integration[bot] wants to merge 1 commit into
developfrom
devin/1789000439-memories-user-attrs

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 10, 2026

Copy link
Copy Markdown

Description

GET /rest/memories (unauthenticated) returned each memory with the fully-serialized associated User row, exposing password (MD5 hash), totpSecret, deluxeToken, email and lastLoginIp of every user who uploaded a memory.

getMemories() now includes UserModel with attributes: ['id', 'username'] — the only field the photo wall frontend consumes (memory.User?.username). An API test asserts the serialized User object contains exactly those keys.

Resolved or fixed issue: none

AI Tool Disclosure

  • My contribution does not include any AI-generated content
  • My contribution includes AI-generated content, as disclosed below:
    • AI Tools: Devin
    • LLMs and versions: Devin (Cognition AI)
    • Prompts: Fix security finding: unauthenticated GET /rest/memories exposes all users' credentials via unrestricted UserModel include

Affirmation

Devin-Org: engineering


Devin Review

Signed-off-by: Devin <devin@cognition.ai>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

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.

1 participant