From ceacff13a666779d75ac48f2cc5c11bc2ce5c6e1 Mon Sep 17 00:00:00 2001 From: Paramat Date: Thu, 3 Jan 2019 11:10:07 +0000 Subject: CSM restrictions: Make 'LOAD_CLIENT_MODS' disable loading of 'builtin' (#8000) Previously, when the CSM restriction 'LOAD_CLIENT_MODS' was used a client was still able to add CSM code to 'builtin' to bypass that restriction, because 'builtin' is not yet verified. Until server-sent CSM and verifying of 'builtin' are complete, make 'LOAD_CLIENT_MODS' disable the loading of builtin. Clarify code comments and messages to distinguish between client-side modding and client-side scripting. 'Scripting' includes 'builtin', 'modding' does not. --- src/network/networkprotocol.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/network/networkprotocol.h') diff --git a/src/network/networkprotocol.h b/src/network/networkprotocol.h index 6d6708482..96dfbe44f 100644 --- a/src/network/networkprotocol.h +++ b/src/network/networkprotocol.h @@ -947,7 +947,11 @@ enum PlayerListModifer: u8 enum CSMRestrictionFlags : u64 { CSM_RF_NONE = 0x00000000, - CSM_RF_LOAD_CLIENT_MODS = 0x00000001, // Disable mods provided by clients + // Until server-sent CSM and verifying of builtin are complete, + // 'CSM_RF_LOAD_CLIENT_MODS' also disables loading 'builtin'. + // When those are complete, this should return to only being a restriction on the + // loading of client mods. + CSM_RF_LOAD_CLIENT_MODS = 0x00000001, // Don't load client-provided mods or 'builtin' CSM_RF_CHAT_MESSAGES = 0x00000002, // Disable chat message sending from CSM CSM_RF_READ_ITEMDEFS = 0x00000004, // Disable itemdef lookups CSM_RF_READ_NODEDEFS = 0x00000008, // Disable nodedef lookups -- cgit v1.2.3