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

Avoid ip info probably not pertaining to this client

parent 6eef99ba
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -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.
Please register or to comment