Movatterモバイル変換


[0]ホーム

URL:


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

fix: correct URL validation and centralize logic#421

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ssncferreira merged 6 commits intomainfromssncferreira/fix-url-validation
Jul 22, 2025

Conversation

ssncferreira
Copy link
Contributor

Description

Fixes incorrect URL validation logic previously used in URL definitions, where the attribute label (s) was being parsed instead of the actual value. This bug caused invalid URLs to be silently accepted.

Additionally, this PR introduces a sharedValidateURL helper function to remove duplication and ensure consistent behavior across all URL fields.

Changes

  • Fixed incorrect use ofurl.Parse(s), now validating the actual value.
  • AddedValidateURL helper function for consistent and reusable validation.
  • Updated all schema definitions that perform URL validation to useValidateURL.
  • Adjusted tests to match the corrected validation logic.

@ssncferreirassncferreiraforce-pushed thessncferreira/fix-url-validation branch from5a69fcb tof8556e8CompareJuly 21, 2025 16:23
@ssncferreirassncferreiraforce-pushed thessncferreira/fix-url-validation branch fromf8556e8 to38bc617CompareJuly 21, 2025 16:27
@ssncferreirassncferreira marked this pull request as ready for reviewJuly 21, 2025 19:35
Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

LGTM!

@ssncferreirassncferreira merged commitd5496af intomainJul 22, 2025
8 of 9 checks passed
@ssncferreirassncferreira deleted the ssncferreira/fix-url-validation branchJuly 22, 2025 12:19
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@mtojekmtojekmtojek approved these changes

@SasSwartSasSwartAwaiting requested review from SasSwart

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@ssncferreira@johnstcn@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp