Some operations in PlayerDomain/GroupDomain do not setDirty(true) so that updates are forgotten on server restart
LadyCailinBot opened this issue ยท 2 comments
WORLDGUARD-3404 - Reported by Brokkonaut
In PlayerDomain the methods are:
removePlayer(UUID uuid) and clear() .
In GroupDomain the method is:
clear()
This is a major issue, because after a server restart players may have permissions in a region where they should not have any permission.
Comment by wizjany
While this may be an issue...worldguard saves everything regardless of dirtyness when the server stops. The only time changes will be lost is if the server crashes.
Comment by Brokkonaut
It does saveChanges() on server shutdown ( https://github.com/sk89q/worldguard/blob/master/src/main/java/com/sk89q/worldguard/protection/managers/RegionContainerImpl.java#L177 ) and saveChanges() relies on ProtectedRegion.isDirty().
How to test:
- Have a server with a region with some player added as member
- Restart the server (to be sure to have no pending changes)
- Do /rg removemember -a regionname
- Restart the server
- The player is member of the region again..