Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add validation for Mastodon handles to prevent invalid URLs #4483

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

Open
marcoacierno wants to merge 1 commit into main
base: main
Choose a base branch
Loading
from claude/issue-3363-20251003-1926

Conversation

@marcoacierno
Copy link
Member

@marcoacierno marcoacierno commented Oct 3, 2025

Summary

This PR adds validation for Mastodon handles to fix the issue where invalid handles like just "username" result in broken URLs (https://undefined/@username).

Changes

  • Added Mastodon handle validation in participant, submission, and grant mutations
  • Enforces proper formats: username@instance.social, @username@instance.social, or https://instance.social/@username
  • Added test case to verify validation works correctly

Fixes #3363

Generated with Claude Code

Fixes #3363
Previously, users could enter invalid Mastodon handles like just "username",
which resulted in broken URLs like "https://undefined/@username" on the public
pages.
This change adds validation to enforce proper Mastodon handle formats:
- username@instance.social
- @username@instance.social
- https://instance.social/@username
The validation is applied in:
- Participant profile updates (api/participants/mutations.py)
- Submission forms for talks/workshops (api/submissions/mutations.py)
- Grant applications (api/grants/mutations.py)
Also added a test case to verify the validation works correctly.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Marco Acierno <marcoacierno@users.noreply.github.com>
Copy link

vercel bot commented Oct 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
pycon Ready Ready Preview Oct 3, 2025 11:39pm

Copy link

codecov bot commented Oct 3, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.46%. Comparing base (6686fae) to head (4b6746d).

Additional details and impacted files
@@ Coverage Diff @@
## main #4483 +/- ##
==========================================
- Coverage 94.53% 94.46% -0.08% 
==========================================
 Files 352 352 
 Lines 10131 10147 +16 
 Branches 733 738 +5 
==========================================
+ Hits 9577 9585 +8 
- Misses 461 466 +5 
- Partials 93 96 +3 
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Invalid Mastodon handle results in https://undefined/@username URL

2 participants

AltStyle によって変換されたページ (->オリジナル) /