Skip to content

Harden profile URL validation and unblock typechecking#76

Merged
aryansondharva merged 6 commits into
mainfrom
copilot/profile-validation-fixes
May 29, 2026
Merged

Harden profile URL validation and unblock typechecking#76
aryansondharva merged 6 commits into
mainfrom
copilot/profile-validation-fixes

Conversation

Copilot AI commented May 29, 2026

Copy link
Copy Markdown
Contributor

Profile edit and collaboration flows were accepting loosely normalized URLs while backend validation was inconsistent across fields. The profile editor also hit TypeScript deprecation errors in the current toolchain, blocking clean validation.

  • Profile URL validation

    • Centralized profile link validation behind a strict HTTP(S) check.
    • Applied the same rule to github_url, linkedin_url, twitter_url, portfolio_url, resume_url, and banner_url.
    • Preserved support for http://localhost, valid domains, and IP-based URLs.
  • Compiler config

    • Added deprecation suppression to both client and backend TS configs so current compiler warnings no longer fail typecheck.

Example:

const isValidHttpUrl = (value: string) => {
  const parsed = new URL(value)
  return (
    (parsed.protocol === 'http:' || parsed.protocol === 'https:') &&
    (parsed.hostname === 'localhost' || isIP(parsed.hostname) > 0 || domainRegex.test(parsed.hostname))
  )
}

@vercel

vercel Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
aryansondharva Ready Ready Preview, Comment May 29, 2026 3:28pm
tech-assassin Ready Ready Preview, Comment May 29, 2026 3:28pm

@aryansondharva aryansondharva marked this pull request as ready for review May 29, 2026 15:28
Copilot AI review requested due to automatic review settings May 29, 2026 15:28
@aryansondharva aryansondharva merged commit 2f9edc4 into main May 29, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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