Skip to content
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

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

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 build yarn build
  • Translation keys yarn i18n:extract
  • Database migration (if required)

Issues Fixed or Closed

…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 sct#4012
@MilanJa
Copy link

MilanJa commented Mar 7, 2025

Since they're being reused, you might as well extract those regex and put them into a src/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

@sct
Copy link
Owner

sct commented Mar 10, 2025

Since they're being reused, you might as well extract those regex and put them into a src/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?

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.

IPv6 URLs not supported in Services
3 participants