mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-02-16 16:41:30 +00:00
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:
parent
f6cdc275f0
commit
6cfe4a3128
1 changed files with 1 additions and 2 deletions
|
@ -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 ();
|
||||
|
|
Loading…
Reference in a new issue