Closed Aws0mee closed 1 year ago
This breaks old dupes. Entity factory functions are supposed to be able to handle nil/invalid values.
This breaks old dupes. Entity factory functions are supposed to be able to handle nil/invalid values.
Is there any way we can fix this? I don't like that somebody can just spawn a dupe with 5,000 broken entities to lag the server and spam my console. I already implemented this code on my own server, but I don't want to see the same thing abused on other servers.
The erroring entity needs to be updated
The erroring entity needs to be updated
what do you mean? It errors with default entities like buttons or lights
Yeah those gotta be fixed. If its a player in particular abusing it, you could just ban them too.
Yeah those gotta be fixed. If its a player in particular abusing it, you could just ban them too.
I already fixed the exploit and banned the players, but I wouldn't want the same exploit being abused on other servers. What do you think could be done for a proper fix? What old dupes would need to spawn entities with invalid args? Maybe we can whitelist entities that can spawn fine with invalid args, or blacklist entities we know will error with invalid args like buttons and lights.
The facepunch/garrysmod repo accepts pull requests for fixes to lua code (sometimes).
For example, the wire light just got a new 'startOn' dupe param this week. Any dupe prior to this week without the new param would not be able to spawn a wire light if this PR got merged.
The facepunch/garrysmod repo accepts pull requests for fixes to lua code (sometimes).
For example, the wire light just got a new 'startOn' dupe param this week. Any dupe prior to this week without the new param would not be able to spawn a wire light if this PR got merged.
So, the only way to properly fix this would be to edit each entity that has this problem and add defaults or something so the values are never nil?
yeah
Prior to this PR, clients could supply insufficient args when spawning an entity which will result in an error. https://github.com/wiremod/advdupe2/pull/417 mitigates this issue by deleting the bugged entities after they're spawned. However, this will still spam the server console with errors which can cause lag and be very annoying. This should properly fix the issue by preventing the bugged entities from being spawned in the first place.