Skip to content

feat: Add lowercase usernames, reserved usernames, and federation tests - #459

Open
habdullhigh wants to merge 3 commits into
Abdulazeem-code:mainfrom
habdullhigh:feat/issue-290-287
Open

feat: Add lowercase usernames, reserved usernames, and federation tests#459
habdullhigh wants to merge 3 commits into
Abdulazeem-code:mainfrom
habdullhigh:feat/issue-290-287

Conversation

@habdullhigh

Copy link
Copy Markdown
Contributor

Description

This PR implements user registration hardening and increases test coverage for the federation endpoint.

Issue References

Changes Made

  • Reserved Usernames (Prevent Reserved Usernames #291): Added a blocked list of reserved keywords (admin, root, stellar, etc.) that are prohibited during registration. The /register endpoint now correctly returns a 403 Forbidden response when an attempt is made to claim one of these names.
  • Lowercase Enforcement (Enforce Lowercase Usernames #290): Verified that usernames are strictly converted to lowercase (.toLowerCase()) before being stored, and that all federation lookups are executed case-insensitively to prevent impersonation.
  • Federation Integration Tests (Add Integration Tests for /federation #287): Added federation.test.js using Jest and Supertest to fully exercise the GET /federation?q=... endpoint. Tests cover successful address lookups, type=id lookups, and missing/invalid username flows (404 Not Found). Also added tests to server.test.js to cover the new reserved usernames functionality.

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Abdulazeem's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@habdullhigh Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Abdulazeem-code

Copy link
Copy Markdown
Owner

Fix backend build test error

@Abdulazeem-code

Copy link
Copy Markdown
Owner

Resolve conflicts and fix backend build error

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.

Prevent Reserved Usernames Enforce Lowercase Usernames Add Integration Tests for /federation

2 participants