Bugzilla – Bug 3197
is_map_valid bug
Last modified: 2013-05-25 17:23:29 PDT
is_map_valid("<*") where * is a digit will always return true for some reason. Evidentally people were exploiting this and crashing servers using my custom nextmap plugin (or also possible that they just typed <3 in the server coincidentally and caused the error to trigger). I added a fix to the plugin that simply checks for unallowed filename characters ( / \ < > ^ * | ?).
Interesting. is_map_valid is just a wrapper around the engine api call.
Yes, I confirm this bug, though that's more a bug in FS_FileExists(), so, the Steam file system. In most of the case, you won't encounter this issue and like said sawnce it's just a wrapper. Looking at the engine code, what does pfnIsValidMap is : - check string is not null - check if map length > 1 - format the string to add "maps/" + ".bsp" and to keep 32 as max length - Check if file exists. My point is, if you need really something more safe to be used in a specific context, I suggest you do your own stock adding the extra checks you want and simply using file_exists() where the bug doesn't occur with it.