Skip to content

Commit

Permalink
Permission-less saveconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
MotoLegacy authored Jul 6, 2024
1 parent 8a01908 commit 46f4bc0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engine/common/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -4164,11 +4164,15 @@ static void Cmd_WriteConfig_f(void)
Q_snprintfz(fname, sizeof(fname), "%s", filename);
COM_RequireExtension(fname, ".cfg", sizeof(fname));

// NZ:P Start -- Restricting saveconfig like this seems silly, but I imagine I'll eat those works eventually.
#if 0
if (Cmd_IsInsecure() && strncmp(fname, "data/", 5))
{
Con_Printf ("%s %s: not allowed\n", Cmd_Argv(0), Cmd_Args());
return;
}
#endif
// NZ:P End

FS_NativePath(fname, FS_BASEGAMEONLY, sysname, sizeof(sysname));
FS_CreatePath(fname, FS_BASEGAMEONLY);
Expand Down

0 comments on commit 46f4bc0

Please sign in to comment.