Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
CSM: Disallow exploitable clientside mod functions by default (#7547)
  • Loading branch information
paramat committed Jul 19, 2018
1 parent bc9bb63 commit 4b36a39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions builtin/settingtypes.txt
Expand Up @@ -1130,17 +1130,17 @@ block_send_optimize_distance (Block send optimize distance) int 4 2
server_side_occlusion_culling (Server side occlusion culling) bool true

# Restricts the access of certain client-side functions on servers
# Combine these byteflags below to restrict more client-side features:
# Combine these byteflags below to restrict client-side features:
# LOAD_CLIENT_MODS: 1 (disable client mods loading)
# CHAT_MESSAGES: 2 (disable send_chat_message call client-side)
# READ_ITEMDEFS: 4 (disable get_item_def call client-side)
# READ_NODEDEFS: 8 (disable get_node_def call client-side)
# LOOKUP_NODES_LIMIT: 16 (limits get_node call client-side to csm_restriction_noderange)
csm_restriction_flags (Client side modding restrictions) int 18
csm_restriction_flags (Client side modding restrictions) int 30

# If the CSM restriction for node range is enabled, get_node calls are limited
# to this distance from the player to the node.
csm_restriction_noderange (Client side node lookup range restriction) int 8
csm_restriction_noderange (Client side node lookup range restriction) int 0

[*Security]

Expand Down
4 changes: 2 additions & 2 deletions src/defaultsettings.cpp
Expand Up @@ -331,8 +331,8 @@ void set_default_settings(Settings *settings)
settings->setDefault("max_block_send_distance", "9");
settings->setDefault("block_send_optimize_distance", "4");
settings->setDefault("server_side_occlusion_culling", "true");
settings->setDefault("csm_restriction_flags", "18");
settings->setDefault("csm_restriction_noderange", "8");
settings->setDefault("csm_restriction_flags", "30");
settings->setDefault("csm_restriction_noderange", "0");
settings->setDefault("max_clearobjects_extra_loaded_blocks", "4096");
settings->setDefault("time_speed", "72");
settings->setDefault("world_start_time", "5250");
Expand Down

0 comments on commit 4b36a39

Please sign in to comment.