Security changes in Flash Player 9.0.124.0
14th May, 2008 | FMud | 20 Comments
The latest security update to Adobe Flash player now makes it compulsory to have a socket policy file even if the application and the server are on the exact same domain. According to Adobe a crossdomain.xml file will no longer apply to socket requests, instead a separate socket policy file needs to be provided to the application. By default the application will first look for the policy file on port 843 and then on the port that the application is trying to open a socket to (the mud port in this case).
The following is the policy file that is used for the FMud demo server.
<?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <site-control permitted-cross-domain-policies="master-only"/> <allow-access-from domain="bc-dev.net" to-ports="4000" /> </cross-domain-policy>
The FMud package has been updated to include a sample policy.xml file as well as a python script that will serve this file.
Use the following command to start the server.
./flashpolicyd.py --file=/path/to/flashpolicy.xml --port=843
Remember to allow a TCP server on port 843 in your server firewall.
Further details on the new security model can be found on the Adobe website. There are also more details on serving policy files as well as some more server scripts for download.

Pingback: FMud 0.1 released - Top Mud Sites Forum
I got the following error while trying to run flashpolicyd.py:
File “./flashpolicyd.py”, line 40
with file(path, ‘rb’) as f:
^
SyntaxError: invalid syntax
Python helpfully tells you that the error occurs at the ‘with’ statement on that line. The ‘with’ statement is new in Python 2.5 so I would guess you are running an older version of Python.
I get error: File must be specified when I run the .py file.
How do I exactly ‘use’ the file?
You can use the command above, ./flashpolicyd.py –file=/path/to/flashpolicy.xml –port=843
This will start the flashpolicyd.py script listening on port 843 and read the flashpolicy.xml file that you specify. Obviously you need to change the file= part to the path where the flashpolicy.xml file is.
In what do I put that?
The .bat that launches my MUD servers?
It’s a shell command, so precisely how you run it depends on your operating system and your server configuration. I assume you’re using Windows if you have a .bat file and if you have Python 2.5 (or higher) installed on your Windows machine you should be able to run the server script in much the same way from the windows command prompt.
Windows isn’t recognizing my ‘policy.bat’ as a valid batch command.
You just need to run the python script from a command prompt in Windows, something like “python flashpolicyd.py –file=/path/to/flashpolicy.xml –port=843″ from the directory where the flashpolicyd.py file is. Make sure you have python installed and the python interpreter is in your PATH.
Sorry but, ‘python’ isn’t recognized as a command prompt command.
I guess that means you don’t have Python installed or that the interpreter is not in your path.
I’ve set it up so that the policy file is being served through the game’s http server. I get the from FMud and in return serve the policy file, but FMud doesn’t respond and I get a security error. This is the policy file I return to flash:
Are u freaking Jokin rite now lolll. Dude u wrote this to work with ur little app here BUT ill tell u wut. U have SAVED my life with this little server. Man ive tried every darn Windows policy server from here to russia and I have YET to find one as reliable and on point as in lets EVERY1 in on the first try.
Even adobes peeps have put together junky windows ones n they didnt work have as reliable as urs lol. I wish i cud PAY u bro.
I use it with LightIRC flash chat and it works flawlessly , uve saved my life tonite bro.
Thx!!!!
dolla
I get the same issue as Brent when I try and run it through an http site. Got everything tied in and all the port details and policy updated but whenever I try and run it I get a security error. what can I do to fix this problem, anyone know?
When running the script as follows:
nohup ./flashpolicyd.py –file=/flashpolicy.xml –port=5055 &
I get the following error:
nohup: failed to run command `./flashpolicyd.py’: permission denied.
Am I mistaken in believing I wouldn’t need root access to use another port here instead of 843?
I managed to run everything and install everything, but I’m running into an issue when attempting to actually connect.
I can see on my immortal channel that the connection is attempting to happen, but then it’s cancelled with a message to the Fmud user reading simply “Unable to connect: security error.”
Any assistance would be greatly appriciated.
@Denna
Check your file permissions
@icarus
Sounds like a policy file issue. Check that the policy file is being served and that you are allowing connections from the correct domain.
I installed it on my mud and it works fine. This post to say: thank you.
Installed it at: http://mud.silmarillia.com/
Pingback: STOMP client not working with latest version of flash player in IE/Mozilla » free icons download
I realize I’m performing a bit of necromancy here on this 2-year old post, but I thought I’d take a moment to recommend using the command “chmod +x flashpolicyd.py” to resolve this error message.