Fix win32 path exploit in download command

This commit is contained in:
Jay Dolan 2006-01-14 14:53:05 +00:00
parent e1326ba6f7
commit 805aec460b

View file

@ -294,7 +294,7 @@ void SV_BeginDownload_f(void){
// hacked by zoid to allow more conrol over download
// first off, no .. or global allow check
if(strstr(name, "..") || !allow_download->value
if(strstr(name, "..") || strstr(name, "\\/") || !allow_download->value
// leading dot is no good
|| *name == '.'
// leading slash bad as well, must be in subdir