feat(registry): blocked-name list and player reports #25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/name-filter-and-reports"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
For ucp-71: a name filter and a report path, so games with leaderboards (Shape City first) can avoid a PEGI 18 rating before App Store submission.
blocked-names.txt(data) andnames.go: a player, account, character or world name holding a listed word is refused with400 {"error": "name is not allowed"}. Look-alike digits and symbols are folded to letters; a plain entry matches anywhere, a=entry only as a whole word, so Classic, Peacock and Therapist stay allowed. A finished game's result naming a blocked player keeps the last allowed name. Admin renames are not checked.POST /api/v1/players/{id}/reports{"reporter", "reason": "name"|"cheating"}-> 202. Stored inplayer_reports(migration 0010), one row per reporter, player and reason; 20 an hour per reporter (429 past it), self-report 400, unknown player 404.GET /api/reports) with Clear name and Dismiss (DELETE /api/reports/{player}[?clear_name=true]), both written to the audit log.Removed: nothing; the name shape rule in
validate.gostays and the list is checked after it.Verified:
go test ./...green locally (Postgres and MinIO containers), including the newTestBlockedNameMatching,TestShippedBlockedNames,TestBlockedNamesAreRefused,TestPlayerReports,TestPlayerReportsAreRateLimitedPerReporter.Going live needs a release: tag
registry-vX.Y.Zto publish the image, then bumpREGISTRY_IMAGE_TAGin the home-config stack. The migration runs at boot.https://claude.ai/code/session_01AWkPsqiyPJFouFVqBtK7i7
A name holding a word of blocked-names.txt is refused (400 "name is not allowed") when a player sets it or names an account, character or world; a result naming one keeps the last allowed name. POST /api/v1/players/{id}/reports stores one report per reporter, player and reason, 20 an hour per reporter. The admin Players page lists reported players with Clear name and Dismiss, both audited. For ucp-71: a name filter and a report path so games with leaderboards can avoid a PEGI 18 rating. Claude-Session: https://claude.ai/code/session_01AWkPsqiyPJFouFVqBtK7i7