Tue 12 Nov 2002 04:35:25 AM UTC, comment #3:
One suggestion.
There appears to be a race condition in your upload code. It can allow someone to:
1) Upload a file, then rename it before the system deletes it via FTP.
2) Upload a file, knowing it will be deleted, then rename another file into its place, where the system deletes it.
To fix this, you need to have muddleftpd upload to a temporary file, and then automaticly program the ACL's to deny access to filenames of that type.
eg
add .temp to the filename automagicly when the user uploads it (where a script must decide to keep it or not) and then, if the server finds the configuration arguments that means it must run the script, execute
acllist_add(peer->acls, "*.temp", "NONE", TRUE);
There may be other race conditions in there to, so please check it out.
Also, I prefer unified diff patches to cvs patch since I can read them easier.
Thanks again.
|