Skip to content

Commit d352c0b

Browse files
authored
client: escape dots in URL regex (#2243)
1 parent 4d4816c commit d352c0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

play.pokemonshowdown.com/js/client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ function toId() {
756756

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

0 commit comments

Comments
 (0)