[ALL] Add deletion of downloaded manifest files from Servers - #2025
[ALL] Add deletion of downloaded manifest files from Servers#2025chocochocotorta wants to merge 2 commits into
Conversation
|
If a malicious server forces download of multiple particle files this will only remove the first? Better is just to reject "_particles.txt" suffix in the client download check but that's in engine.dll. |
In case the server does this, the client will just delete all files containing _particles.txt inside download/maps/.
That could also work, but i'm not sure how good would be for Valve to add that specific case inside the engine. |
|
I recommend also doing same for following files: For example: As these files can also be abused. I'm personally against blocking things in engine.dll, as there are legitimate uses for uploading _level_sounds.txt or _particles.txt that is not packed into map. Removing these files just on disconnect would be most flexible in my opinion. |
I'll make the PR as draft and implement the same thing for level sounds too, it'll take me a bit of time since I'm outside. |
Added to remove both particles.txt and level_sounds.txt, moved to all games instead of just TF and only purge on game close.
Added to also delete _level_sounds.txt when closing the game (i tried to rename the branch and it accidentally got deleted from the PR). |
When connecting to a Community Server, this one can provide downloads of any type (in this case, .pcf files for particles and a txt inside maps that contains a manifest for particles or level sounds in a specific map).
While this is not an issue in custom maps that already packs it's own manifest file inside because it takes priority over the downloaded one, a server could maliciously send lots of particles manifest files for all the base game maps with a pcf that floods the "ParticleEffectNames" string table on precache (making some of the default particles from the base game not being precached and display the default error particle), mute/replace certain sounds, or crash the client when creating a Local Server.
The PR checks for files ending in particles.txt or level_sounds.txt inside download/maps and deletes them on game exit (like tf_delete_temp_files).
Tested both in TF2 & HL2:DM.