Domanda

Currently I'm working on a web project (Classic Asp) and I'm going to make an upload form.
Folklore says:

"Don't use the real name to save the uploaded files"

. What are the problems, dangers, from the security point of view ?

È stato utile?

Soluzione

Proper directory permissions should stop most of this stuff but I suppose for file names a potential danger is that they could name it something like "../Default.asp" or "../Malware.asp" or some other malicious path attempting to overwrite files and/or have an executable script on your server.

If I'm using a single upload folder, I always save my users uploads with a GUID file name just because users aren't very original and you get name conflicts very often otherwise.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top