[TF2] Add deletion of downloaded Particles Manifest from Servers - #2025
[TF2] Add deletion of downloaded Particles Manifest from Servers#2025chocochocotorta wants to merge 1 commit 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. |
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 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 giving an error when it's played on a Local Server.
The solution i found is purging the particles that are inside download/maps/ when you:
This also allows servers to send a particle manifest to the client, allowing the use of Custom Particles without the need to pack them on a map.
Console warning about ParticleEffectNames for precaching a bad particle file