change the client side download rename code to reject ANY new / in the file

name. This means that if maps/foo.bsp is requested, maps/foo.bsp/nasty_server
will be rejected but maps/foo.bsp.gz will be accepted.
This commit is contained in:
Bill Currie 2000-09-28 15:35:05 +00:00
parent f6cdc275f0
commit 6cfe4a3128
1 changed files with 1 additions and 2 deletions

View File

@ -394,8 +394,7 @@ void CL_ParseDownload (void)
if (size == -2) {
char *newname = MSG_ReadString();
if (strncmp (newname, cls.downloadname, strlen(cls.downloadname))
|| strstr(newname, "/../")
|| strstr(newname, "/./")) {
|| strstr(newname+strlen(cls.downloadname), "/")) {
Con_Printf ("WARNING: server tried to give a strange new name: %s\n",
newname);
CL_RequestNextDownload ();