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

Create Egress Gateway range validation #151

Open
Dim0N22 opened this issue Jun 9, 2022 · 0 comments
Open

Create Egress Gateway range validation #151

Dim0N22 opened this issue Jun 9, 2022 · 0 comments

Comments

@Dim0N22
Copy link

Dim0N22 commented Jun 9, 2022

The Create Egress Gateway form requires a range and an interface. The form doesn't have any validation for ranges, so 1.2.3.4 will be accepted without any error messages even though it won't be applied in Wireguard.

There need to be validation at some level (ui / service / both).

P.S. There seems to be a regex for this, but it's unused:

export const correctSubnetRegex = new RegExp(
/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/\d{1,3}$/i
)

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

No branches or pull requests

1 participant