Skip to content

Commit

Permalink
client: escape dots in URL regex (#2243)
Browse files Browse the repository at this point in the history
  • Loading branch information
laggron42 committed Apr 13, 2024
1 parent 4d4816c commit d352c0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion play.pokemonshowdown.com/js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ function toId() {

var self = this;
var constructSocket = function () {
if (location.host === 'localhost.psim.us' || /[0-9]+.[0-9]+.[0-9]+.[0-9]+\.psim\.us/.test(location.host)) {
if (location.host === 'localhost.psim.us' || /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\.psim\.us/.test(location.host)) {
// normally we assume HTTPS means HTTPS, but make an exception for
// localhost and IPs which generally can't have a signed cert anyway.
Config.server.port = 8000;
Expand Down

0 comments on commit d352c0b

Please sign in to comment.