Skip to content

Commit

Permalink
Sort list of allowed extensions and also add ‘ogg’.
Browse files Browse the repository at this point in the history
  • Loading branch information
skullernet committed Jan 16, 2023
1 parent 0606424 commit 2700068
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/client/download.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,11 @@ to prevent the server from uploading arbitrary files.
bool CL_CheckDownloadExtension(const char *ext)
{
static const char allowed[][4] = {
"pcx", "wal", "wav", "md2", "sp2", "tga", "png",
"jpg", "bsp", "ent", "txt", "dm2", "loc", "md3"
"bsp", "dm2", "ent", "jpg", "loc", "md2", "md3", "ogg", "pcx", "png",
"sp2", "tga", "txt", "wal", "wav",
};
int i;

for (i = 0; i < q_countof(allowed); i++)
for (int i = 0; i < q_countof(allowed); i++)
if (!Q_stricmp(ext, allowed[i]))
return true;

Expand Down

0 comments on commit 2700068

Please sign in to comment.