-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: proxy now rejects forward connections that contain the
0.0.0.0
…
… wildcard #369
- Loading branch information
1 parent
437be7f
commit 97cae6f
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I thought it would be better to use the https://github.com/ip-num/ip-num library. We already use it in
network/utils.ts
. And we have some functions there.Note that I tried
isValidIPv4String
and it does return true for0.0.0.0
. Same forisValidIPv6String
and it returns true for::
.So you want to have a separate utility function called
isHostWildcard
, and check specifically for0.0.0.0
and::
.