Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ELI5] Validate too long handles in signup #7422

Merged
merged 2 commits into from
Jan 10, 2025
Merged

Conversation

mozzius
Copy link
Member

@mozzius mozzius commented Jan 10, 2025

Checks if a handle is too long in the signup flow. Handles can be up to 253 chars normally, but for PDS service handles the max is 30, including domain. I added an additional flag to the validateHandle function to lower the length check appropriately. I made it generic for other PDSes, rather than hard-coding 18 chars. I also corrected the logic in the change handle screen since that was hardcoded to 18.

Screenshot 2025-01-10 at 13 49 13

Test plan

  1. Confirm that the limit really is 30 chars - go through the signup process on main with a 19 char username and confirm it fails
  2. Check that the PR change catches it, and check that the error message is correct

@arcalinea arcalinea temporarily deployed to samuel/signup-check-length - social-app PR #7422 January 10, 2025 13:48 — with Render Destroyed
@mozzius mozzius changed the title Validate too long handles in signup [ELI5] Validate too long handles in signup Jan 10, 2025
@mozzius mozzius requested a review from gaearon January 10, 2025 13:51
Copy link

Old size New size Diff
6.86 MB 6.86 MB -50 B (-0.00%)

Copy link
Member

@estrattonbailey estrattonbailey left a comment

Choose a reason for hiding this comment

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

Yep nice one!

@mozzius mozzius merged commit a7da646 into main Jan 10, 2025
7 checks passed
@mozzius mozzius deleted the samuel/signup-check-length branch January 10, 2025 17:57
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.

3 participants