diff --git a/xtrn/wttr.in/locator.js b/xtrn/wttr.in/locator.js index 55c17512f8a5a36db58b501a9ab8cc5d91a90959..9ee9dc18eb26cdeee3fbe40f2651fc126b73b13c 100644 --- a/xtrn/wttr.in/locator.js +++ b/xtrn/wttr.in/locator.js @@ -14,6 +14,8 @@ function getAddress() { */ const f = new File(system.temp_path + 'sbbs-ws-' + client.socket.remote_port + '.ip'); if (!f.exists) return; + if (f.date < client.connect_time) return; // Avoid stale ws ip files + if (f.date - client.connect_time > 5) return; // Avoid ws ip files probably not belonging to this user (5 seconds arbitrary) if (!f.open('r')) return; const addr = f.read(); f.close();