Skip to content
Snippets Groups Projects
Commit c6451ffb authored by ree's avatar ree
Browse files

2 isn't always better than 1

(don't need 2 socket policy services)
parent 39b730c3
No related branches found
No related tags found
No related merge requests found
// $Id$
load("ftelnethelper.js");
// Flash Socket Policy Service
// This service allows fTelnet to connect to the BBS on either the Telnet or RLogin port
var InString = "";
var ValidRequest = "<policy-file-request/>";
var StartTime = time();
while ((client.socket.is_connected) && (InString.length < ValidRequest.length) && ((time() - StartTime) <= 5)) {
if (client.socket.poll(time() - StartTime) > 0) {
InString += client.socket.recv(ValidRequest.length - InString.length);
}
}
if (InString === ValidRequest) {
log(LOG_DEBUG, "Answering valid socket policy file request");
client.socket.send('<?xml version="1.0"?><!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">');
client.socket.send('<cross-domain-policy>');
client.socket.send('<site-control permitted-cross-domain-policies="master-only"/>');
client.socket.send('<allow-access-from domain="*" to-ports="' + GetTerminalServerPorts() + '" />');
client.socket.send('</cross-domain-policy>');
} else {
log(LOG_DEBUG, "Ignoring invalid socket policy file request: '" + InString + "'");
}
\ No newline at end of file
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