Skip to content

fix: validate location URLs using URL constructor in CalEventParser#28548

Draft
NikolaVujovic1988 wants to merge 1 commit intocalcom:mainfrom
NikolaVujovic1988:fix/validate-location-url
Draft

fix: validate location URLs using URL constructor in CalEventParser#28548
NikolaVujovic1988 wants to merge 1 commit intocalcom:mainfrom
NikolaVujovic1988:fix/validate-location-url

Conversation

@NikolaVujovic1988
Copy link

Summary

  • Replaces regex-based URL check (/^https?:\/\//) with proper URL constructor validation in getProviderName
  • Removes the stale TODO comment — packages/lib must not import from @calcom/app-store per architecture rules

Context

Addresses review feedback from #28242, where @romitg2 requested using an existing library/function for URL validation rather than simply removing the comment.

The URL constructor is already used for validation elsewhere in packages/lib (e.g., getSafeRedirectUrl.ts) and requires no additional dependencies.

Test plan

  • No functional changes — URL validation behavior is preserved with stricter parsing
  • yarn type-check:ci --force passes

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant