Skip to content
Snippets Groups Projects
Commit 1c29f741 authored by echicken's avatar echicken :chicken:
Browse files

Avoid ip info probably not pertaining to this client

parent ab33ab91
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment