Hi,
I've read a few bits on the web about vulnerabilities in providing
file uploads where the upload could contain ../../ and so allow 'back
browsing' to other files on the server and copying them to a public
directory. If I was to check for this scenerio, would I have to do
something like (in simple terms):
if $_FILES['userfile']['tmp_name'] or $_FILES['userfile']['name'] =
.../../
echo u are norty
else
continue with code
Also, is it possible to verfiy that the referring html form to my
upload script originates from my server only? I could stop anyone from
creating their own forms then.
Many thanks
I've read a few bits on the web about vulnerabilities in providing
file uploads where the upload could contain ../../ and so allow 'back
browsing' to other files on the server and copying them to a public
directory. If I was to check for this scenerio, would I have to do
something like (in simple terms):
if $_FILES['userfile']['tmp_name'] or $_FILES['userfile']['name'] =
.../../
echo u are norty
else
continue with code
Also, is it possible to verfiy that the referring html form to my
upload script originates from my server only? I could stop anyone from
creating their own forms then.
Many thanks
Comment