fix(backend): username (Login-Identifikator) aus öffentlichen Payloads entfernt
community/posts.get.ts + social/profile/[userId].get.ts lieferten neben nickname auch username an fremde Clients — username ist der Login- Identifikator ({username}@rebreak.internal) und verletzt die Nickname- Anonymitäts-Invariante (REQ-COMM-005 / R-DATA-07) + exponiert das halbe Login-Credential-Paar. Frontend rendert das Feld nirgends (verifiziert); totes Typ-Feld in stores/community.ts entfernt. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
63fae25531
commit
2c33ba55a4
@ -4,7 +4,6 @@ export type CommunityCategory = 'all' | 'games' | 'domain_vote' | 'lyra' | 'rebr
|
||||
|
||||
export interface CommunityPostAuthor {
|
||||
id: string | null;
|
||||
username: string;
|
||||
nickname: string;
|
||||
avatar: string | null;
|
||||
plan: string;
|
||||
|
||||
@ -115,7 +115,8 @@ export default defineEventHandler(async (event) => {
|
||||
: null,
|
||||
author: {
|
||||
id: p.userId ?? null,
|
||||
username: a?.username ?? "Nutzer",
|
||||
// username ist der Login-Identifikator (→ {username}@rebreak.internal)
|
||||
// und darf NIE an fremde Clients gehen — Anonymitäts-Invariante (nickname-only).
|
||||
nickname: a?.nickname ?? a?.username ?? "Nutzer",
|
||||
avatar: a?.avatar ?? null,
|
||||
plan: (a as any)?.plan ?? "free",
|
||||
|
||||
@ -56,7 +56,7 @@ export default defineEventHandler(async (event) => {
|
||||
|
||||
return {
|
||||
id: profile.id,
|
||||
username: profile.username,
|
||||
// username (Login-Identifikator) bewusst NICHT exponiert — nickname-only.
|
||||
nickname: meta.nickname ?? profile.username,
|
||||
avatar: meta.avatar,
|
||||
bio: (profile as any).bio ?? null,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user