player can manage any map

Report any bugs you find in fCraft here
Post Reply
User avatar
Hellenion
Offline
Posts: 220
Joined: October 20th, 2011, 9:20 am
Location: Subnet
Contact:

player can manage any map

Post by Hellenion »

A player with manageWorlds permission can remove/overwrite any map, even maps that are above the player's rank.

related:
a player can set WBuild to above his own rank without warning. (possibly irreversible)

I actually have been using this bug for a long time before I realized it shouldn't be possible.
A = {x ∈ P(U) | x ∉ x}
Mods:
  1. /Su - Allows players to temporarily become a different rank
  2. /Snap - Like /Line but only draws straight or diagonal lines.
  3. pre-0.630 skip/none block

User avatar
Lim-Dul
The Necromancer
Offline
Posts: 664
Joined: May 21st, 2011, 10:21 pm

Re: player can manage any map

Post by Lim-Dul »

I don't think that's a bug. This is how the Manage Worlds permission works and why it's a very powerful one that you shouldn't give to everyone.

On a conceptual level - how would you stop players with Manage Worlds to do what you described? The can load/unload maps, generate new ones and so on.

The only way I would see is for them to not be able to manage worlds above their rank but this still would solve just one aspect of the Manage Worlds permission and would only apply to loaded worlds...
War does not determine who is right - only who is left. - Bertrand Russell

User avatar
Hellenion
Offline
Posts: 220
Joined: October 20th, 2011, 9:20 am
Location: Subnet
Contact:

Re: player can manage any map

Post by Hellenion »

I'm not having problems with people deleting my maps or anything, it just struck me that I was able to overwrite maps that I weren't allowed to build on.

Checking if a player has permission to edit the map before overwriting/removing would really prevent them from editing that map. I'm not worried about loading stuff, that doesn't have any irreversible effects.

And yes, it would only apply to loaded worlds.
A = {x ∈ P(U) | x ∉ x}
Mods:
  1. /Su - Allows players to temporarily become a different rank
  2. /Snap - Like /Line but only draws straight or diagonal lines.
  3. pre-0.630 skip/none block

User avatar
Lim-Dul
The Necromancer
Offline
Posts: 664
Joined: May 21st, 2011, 10:21 pm

Re: player can manage any map

Post by Lim-Dul »

Hellenion wrote:I'm not worried about loading stuff, that doesn't have any irreversible effects.
Yes it would. You save a new world under the name of an unloaded one et voila - overwritten. But let's wait to see what the mighty fragmer can do.
War does not determine who is right - only who is left. - Bertrand Russell

User avatar
fragmer
fCraft Developer
Offline
Posts: 1386
Joined: May 21st, 2011, 10:53 pm

Re: player can manage any map

Post by fragmer »

"A player with manageWorlds permission can remove/overwrite any map, even maps that are above the player's rank." - Right now permissions are not saved in a map file (.fcm), only in the world list file (worlds.xml). I guess need to add a couple things:

- Add a check to /WLoad, /Gen, and /WSave to see if the mapfile is associated with a loaded world, and check its permissions.
- If it's not loaded, check if mapfile has embedded permissions (which I will start saving soon) from the last time that it's been associated with a world. Maybe.

Related:
"A player can set WBuild to above his own rank without warning." - Well, it's their fault :P

Post Reply