From 8e697c826fa5472eca00517e522d6177e536a72b Mon Sep 17 00:00:00 2001
From: echicken <echicken@bbs.electronicchicken.com>
Date: Wed, 22 Feb 2023 18:52:48 +0000
Subject: [PATCH] Fix addrRe

---
 xtrn/wttr.in/locator.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xtrn/wttr.in/locator.js b/xtrn/wttr.in/locator.js
index e59d58b0c6..ffaa4a3ff7 100644
--- a/xtrn/wttr.in/locator.js
+++ b/xtrn/wttr.in/locator.js
@@ -83,7 +83,7 @@ function wsrsGetIPAddress() {
 
 function getAddress() {
 	log(LOG_DEBUG, 'user.ip_address is ' + user.ip_address);
-	const addrRe = /^(127\.)|(192\.168\.)|(10\.)|(172\.1[6-9]\.)|(172\.2[0-9]\.)|(172\.3[0-1]\.)|(169\.254\.)|(::1$)|([fF][cCdD])/;
+	const addrRe = /(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^169\.254\.)|(^::1$)|(^[fF][cCdD])/;
 	if (user.ip_address.search(addrRe) > -1) {
 		var addr;
 		if (client.protocol === 'Telnet') {
-- 
GitLab