Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

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
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

fix(ipv6 regex matching): replaced existing regex for IPv4/6 address …#4066

Open
lmiklosko wants to merge2 commits intosct:develop
base:develop
Choose a base branch
Loading
fromlmiklosko:fix/4012-ipv6-urls-not-supported-in-services

Conversation

lmiklosko
Copy link
Contributor

…matching with new one

Current regex does not correctly capture valid ipv6 addresses, such as fd01::3:172:20:24:5 and thinks 127.0.0.0.0.0.1 is a valid address. This PR addresses these issues.

fix#4012

Description

Screenshot (if UI-related)

To-Dos

  • Successful buildyarn build
  • Translation keysyarn i18n:extract
  • Database migration (if required)

Issues Fixed or Closed

…matching with new oneCurrent regex does not correctly capture valid ipv6 addresses, such as fd01::3:172:20:24:5 andthinks 127.0.0.0.0.0.1 is a valid address. This PR addresses these issues.fixsct#4012
@MilanJa
Copy link

Since they're being reused, you might as well extract those regex and put them into asrc/utils/validationHelpers.ts file that could be the single point for all complex regex and all the uses of it have descriptive names instead. But otherwise lgtm

gauthier-th and lmiklosko reacted with thumbs up emoji

@sct
Copy link
Owner

sct commentedMar 10, 2025

Since they're being reused, you might as well extract those regex and put them into asrc/utils/validationHelpers.ts file that could be the single point for all complex regex and all the uses of it have descriptive names instead. But otherwise lgtm

I think this is great feedback. Would you mind adopting this@lmiklosko?

@lmiklosko
Copy link
ContributorAuthor

Good idea@MilanJa. I've split those into separate regex IPv4/IPv6 and DNS, improving clarity. Might not be 100% accurate (eg. still matches 256.256.256.256 when combined with DNS matcher), but unlike before, allows all valid IPv6 addresses.

MilanJa reacted with thumbs up emoji

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

@sctsctAwaiting requested review from sctsct is a code owner

@TheCatLadyTheCatLadyAwaiting requested review from TheCatLadyTheCatLady is a code owner

@danshilmdanshilmAwaiting requested review from danshilmdanshilm is a code owner

@OwsleyJrOwsleyJrAwaiting requested review from OwsleyJrOwsleyJr is a code owner

At least 1 approving review is required to merge this pull request.

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

Successfully merging this pull request may close these issues.

IPv6 URLs not supported in Services
3 participants
@lmiklosko@MilanJa@sct

[8]ページ先頭

©2009-2025 Movatter.jp