-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
dns: tweak regex for IPv6 addresses #8665
Conversation
The regex used in `dns.setServers()` to match IPv6 addresses in square brackets uses a capturing group for the port but this info is not needed. This commit replaces the capturing group with a non capturing one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice find.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but we really ought to get away from using a regex for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'll start landing this:
|
The regex used in `dns.setServers()` to match IPv6 addresses in square brackets uses a capturing group for the port but this info is not needed. This commit replaces the capturing group with a non capturing one. PR-URL: nodejs#8665 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
landed in 575077a |
The regex used in `dns.setServers()` to match IPv6 addresses in square brackets uses a capturing group for the port but this info is not needed. This commit replaces the capturing group with a non capturing one. PR-URL: #8665 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
adding to lts watch, let me know if it should be removed. This will need a manual backport but I can handle it |
The regex used in `dns.setServers()` to match IPv6 addresses in square brackets uses a capturing group for the port but this info is not needed. This commit replaces the capturing group with a non capturing one. Refs: nodejs#8965 PR-URL: nodejs#8665 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
The regex used in `dns.setServers()` to match IPv6 addresses in square brackets uses a capturing group for the port but this info is not needed. This commit replaces the capturing group with a non capturing one. Ref: #8965 PR-URL: #8665 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
The regex used in `dns.setServers()` to match IPv6 addresses in square brackets uses a capturing group for the port but this info is not needed. This commit replaces the capturing group with a non capturing one. Ref: #8965 PR-URL: #8665 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
The regex used in `dns.setServers()` to match IPv6 addresses in square brackets uses a capturing group for the port but this info is not needed. This commit replaces the capturing group with a non capturing one. PR-URL: #8665 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
The regex used in `dns.setServers()` to match IPv6 addresses in square brackets uses a capturing group for the port but this info is not needed. This commit replaces the capturing group with a non capturing one. Ref: #8965 PR-URL: #8665 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
The regex used in `dns.setServers()` to match IPv6 addresses in square brackets uses a capturing group for the port but this info is not needed. This commit replaces the capturing group with a non capturing one. Ref: #8965 PR-URL: #8665 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
dns
Description of change
The regex used in
dns.setServers()
to match IPv6 addresses in square brackets uses a capturing group for the port but this info is not needed.This commit replaces the capturing group with a non capturing one.