Skip to content

Feature/gift security fraud prevention#321

Merged
aji70 merged 13 commits intoSaboStudios:mainfrom
jhayniffy:feature/gift-security-fraud-prevention
Feb 26, 2026
Merged

Feature/gift security fraud prevention#321
aji70 merged 13 commits intoSaboStudios:mainfrom
jhayniffy:feature/gift-security-fraud-prevention

Conversation

@jhayniffy
Copy link
Contributor

This PR introduces a Gift Acceptance and Claim System that enables users to securely receive and claim gifted assets.closes #256

- Add UserSuspension entity to track suspension history with reasons
- Implement suspend/unsuspend endpoints (admin only)
- Add SuspensionCheckMiddleware to block suspended users on all requests
- Update auth service to prevent suspended users from logging in
- Log all suspension actions via AdminLogsService
- Log suspended user login attempts to console
- Add suspension history endpoint
- Include unit tests for suspension functionality
- Add database migration for user_suspensions table
- Add user_inventory table with indexes and foreign keys
- Create InventoryService with add, get, use, and cleanup methods
- Integrate inventory with purchase flow
- Integrate inventory with gift acceptance
- Add inventory API endpoints (GET /shop/inventory, /shop/inventory/active)
- Add comprehensive test suite for inventory service
- Support quantity tracking and optional expiration
- Add rate limiting to all gift endpoints (10-60 req/min)
- Implement anti-spam limits (50 gifts/day, 10 per receiver/day)
- Add replay attack protection (status validation)
- Implement comprehensive audit logging with IP tracking
- Add security warnings for suspicious activity
- Prevent self-gifting with validation
- Add security test suite
- Track user agent and IP for all gift operations
Copy link
Contributor

@aji70 aji70 left a comment

Choose a reason for hiding this comment

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

LFG

@aji70 aji70 merged commit b4d11a9 into SaboStudios:main Feb 26, 2026
3 checks passed
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.

[BE] Gift Security and Fraud Prevention

2 participants