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

client: escape dots in URL regex #2243

Merged
merged 1 commit into from
Apr 13, 2024
Merged

client: escape dots in URL regex #2243

merged 1 commit into from
Apr 13, 2024

Conversation

laggron42
Copy link
Contributor

@laggron42 laggron42 commented Apr 12, 2024

This line looks for URLs without a port specified and sets the default port of 8000. However, in the case of IP subdomains (such as 127.0.0.1-12345.psim.us), the port 12345 is overwritten because the - is ignored by the unescaped dot.

This PR escapes the dots forming the IP address and ensures the port is not being overwritten when specified.

Tested in the console's browser:
image

@Zarel Zarel merged commit d352c0b into smogon:master Apr 13, 2024
1 check passed
@Zarel
Copy link
Member

Zarel commented Apr 13, 2024

Thanks!

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.

None yet

2 participants