Skip to content

Commit

Permalink
Disable slam defense by default
Browse files Browse the repository at this point in the history
Slam defense was broken for so long that it effectively defaulted
to false -- make that the actual default to avoid BC breakage.

Fixes #347.
  • Loading branch information
nikic committed Nov 20, 2018
1 parent ce47957 commit c510a5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions php_apc.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ apc_sma_t apc_sma;
static void php_apc_init_globals(zend_apcu_globals* apcu_globals)
{
apcu_globals->initialized = 0;
apcu_globals->slam_defense = 1;
apcu_globals->slam_defense = 0;
apcu_globals->smart = 0;
apcu_globals->preload_path = NULL;
apcu_globals->coredump_unmap = 0;
Expand Down Expand Up @@ -147,7 +147,7 @@ STD_PHP_INI_ENTRY("apc.smart", "0", PHP_INI_SYSTEM, OnUpdateLong,
STD_PHP_INI_ENTRY("apc.mmap_file_mask", NULL, PHP_INI_SYSTEM, OnUpdateString, mmap_file_mask, zend_apcu_globals, apcu_globals)
#endif
STD_PHP_INI_BOOLEAN("apc.enable_cli", "0", PHP_INI_SYSTEM, OnUpdateBool, enable_cli, zend_apcu_globals, apcu_globals)
STD_PHP_INI_BOOLEAN("apc.slam_defense", "1", PHP_INI_SYSTEM, OnUpdateBool, slam_defense, zend_apcu_globals, apcu_globals)
STD_PHP_INI_BOOLEAN("apc.slam_defense", "0", PHP_INI_SYSTEM, OnUpdateBool, slam_defense, zend_apcu_globals, apcu_globals)
STD_PHP_INI_ENTRY("apc.preload_path", (char*)NULL, PHP_INI_SYSTEM, OnUpdateString, preload_path, zend_apcu_globals, apcu_globals)
STD_PHP_INI_BOOLEAN("apc.coredump_unmap", "0", PHP_INI_SYSTEM, OnUpdateBool, coredump_unmap, zend_apcu_globals, apcu_globals)
STD_PHP_INI_BOOLEAN("apc.use_request_time", "1", PHP_INI_ALL, OnUpdateBool, use_request_time, zend_apcu_globals, apcu_globals)
Expand Down

0 comments on commit c510a5f

Please sign in to comment.