Skip to content

[fix] ipv6 hostnames are not correctly matched #34

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

Open
3 tasks done
AilPhaune opened this issue Mar 8, 2025 · 0 comments
Open
3 tasks done

[fix] ipv6 hostnames are not correctly matched #34

AilPhaune opened this issue Mar 8, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@AilPhaune
Copy link

AilPhaune commented Mar 8, 2025

Describe the bug

Node.js version:
v23.9.0

OS version:
WSL2 Ubuntu: Linux 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Description:
ipv6 hostnames are not correctly matched in urls

Actual behavior

Matches only the ::1 part in http://[::1]/

Expected behavior

It should match the whole http://[::1]/

Code to reproduce

const urlRegexSafe = require('url-regex-safe');
// Expected: http://[::1]/
// Actual: ::1
console.log('http://[::1]/'.match(urlRegexSafe()));

Checklist

  • I have searched through GitHub issues for similar issues.
  • I have completely read through the README and documentation.
  • I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.
@AilPhaune AilPhaune added the bug Something isn't working label Mar 8, 2025
@AilPhaune AilPhaune mentioned this issue Mar 8, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant