diff options
Diffstat (limited to 'suhosin7.c')
| -rw-r--r-- | suhosin7.c | 50 |
1 files changed, 24 insertions, 26 deletions
| @@ -18,8 +18,6 @@ | |||
| 18 | +----------------------------------------------------------------------+ | 18 | +----------------------------------------------------------------------+ |
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | /* $Id$ */ | ||
| 22 | |||
| 23 | #ifdef HAVE_CONFIG_H | 21 | #ifdef HAVE_CONFIG_H |
| 24 | #include "config.h" | 22 | #include "config.h" |
| 25 | #endif | 23 | #endif |
| @@ -40,7 +38,7 @@ ZEND_DECLARE_MODULE_GLOBALS(suhosin7) | |||
| 40 | #define PERDIR_CHECK(lower) \ | 38 | #define PERDIR_CHECK(lower) \ |
| 41 | if (!SUHOSIN7_G(lower ## _perdir) && stage == ZEND_INI_STAGE_HTACCESS) { \ | 39 | if (!SUHOSIN7_G(lower ## _perdir) && stage == ZEND_INI_STAGE_HTACCESS) { \ |
| 42 | return FAILURE; \ | 40 | return FAILURE; \ |
| 43 | } | 41 | } |
| 44 | 42 | ||
| 45 | #define LOG_PERDIR_CHECK() PERDIR_CHECK(log) | 43 | #define LOG_PERDIR_CHECK() PERDIR_CHECK(log) |
| 46 | #define EXEC_PERDIR_CHECK() PERDIR_CHECK(exec) | 44 | #define EXEC_PERDIR_CHECK() PERDIR_CHECK(exec) |
| @@ -98,9 +96,9 @@ static ZEND_INI_MH(OnUpdateSuhosin_perdir) | |||
| 98 | if (new_value == NULL || ZSTR_LEN(new_value) == 0) { | 96 | if (new_value == NULL || ZSTR_LEN(new_value) == 0) { |
| 99 | return SUCCESS; | 97 | return SUCCESS; |
| 100 | } | 98 | } |
| 101 | 99 | ||
| 102 | char *tmp = ZSTR_VAL(new_value); | 100 | char *tmp = ZSTR_VAL(new_value); |
| 103 | 101 | ||
| 104 | /* should we deactivate perdir completely? */ | 102 | /* should we deactivate perdir completely? */ |
| 105 | if (*tmp == '0') { | 103 | if (*tmp == '0') { |
| 106 | return SUCCESS; | 104 | return SUCCESS; |
| @@ -145,7 +143,7 @@ list_destroy: | |||
| 145 | 143 | ||
| 146 | *ht = pemalloc(sizeof(HashTable), 1); | 144 | *ht = pemalloc(sizeof(HashTable), 1); |
| 147 | zend_hash_init(*ht, 5, NULL, NULL, 1); | 145 | zend_hash_init(*ht, 5, NULL, NULL, 1); |
| 148 | 146 | ||
| 149 | char *val = estrndup(list, strlen(list)); | 147 | char *val = estrndup(list, strlen(list)); |
| 150 | if (lc) { | 148 | if (lc) { |
| 151 | zend_str_tolower(val, strlen(list)); | 149 | zend_str_tolower(val, strlen(list)); |
| @@ -153,7 +151,7 @@ list_destroy: | |||
| 153 | 151 | ||
| 154 | char *e = val; | 152 | char *e = val; |
| 155 | char *s = NULL; | 153 | char *s = NULL; |
| 156 | 154 | ||
| 157 | while (*e) { | 155 | while (*e) { |
| 158 | switch (*e) { | 156 | switch (*e) { |
| 159 | case ' ': | 157 | case ' ': |
| @@ -299,25 +297,25 @@ PHP_INI_BEGIN() | |||
| 299 | PHP_INI_ENTRY("suhosin.executor.func.blacklist", NULL, PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateSuhosin_func_blacklist) | 297 | PHP_INI_ENTRY("suhosin.executor.func.blacklist", NULL, PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateSuhosin_func_blacklist) |
| 300 | // STD_S7_INI_BOOLEAN("suhosin.executor.disable_eval", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecBool, executor_disable_eval) | 298 | // STD_S7_INI_BOOLEAN("suhosin.executor.disable_eval", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecBool, executor_disable_eval) |
| 301 | STD_S7_INI_BOOLEAN("suhosin.executor.disable_emodifier", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecBool, executor_disable_emod) | 299 | STD_S7_INI_BOOLEAN("suhosin.executor.disable_emodifier", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecBool, executor_disable_emod) |
| 302 | // | 300 | // |
| 303 | STD_S7_INI_BOOLEAN("suhosin.executor.allow_symlink", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecBool, executor_allow_symlink) | 301 | STD_S7_INI_BOOLEAN("suhosin.executor.allow_symlink", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecBool, executor_allow_symlink) |
| 304 | STD_S7_INI_ENTRY("suhosin.executor.max_depth", "750", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecLong, max_execution_depth) | 302 | STD_S7_INI_ENTRY("suhosin.executor.max_depth", "750", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateExecLong, max_execution_depth) |
| 305 | // | 303 | // |
| 306 | // | 304 | // |
| 307 | STD_S7_INI_BOOLEAN("suhosin.multiheader", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateMiscBool, allow_multiheader) | 305 | STD_S7_INI_BOOLEAN("suhosin.multiheader", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateMiscBool, allow_multiheader) |
| 308 | // STD_S7_INI_ENTRY("suhosin.mail.protect", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateMiscLong, mailprotect) | 306 | // STD_S7_INI_ENTRY("suhosin.mail.protect", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateMiscLong, mailprotect) |
| 309 | STD_S7_INI_ENTRY("suhosin.memory_limit", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateMiscLong, memory_limit) | 307 | STD_S7_INI_ENTRY("suhosin.memory_limit", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateMiscLong, memory_limit) |
| 310 | STD_S7_INI_BOOLEAN("suhosin.simulation", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateMiscBool, simulation) | 308 | STD_S7_INI_BOOLEAN("suhosin.simulation", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateMiscBool, simulation) |
| 311 | // STD_S7_INI_ENTRY("suhosin.filter.action", NULL, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateMiscString, filter_action) | 309 | // STD_S7_INI_ENTRY("suhosin.filter.action", NULL, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateMiscString, filter_action) |
| 312 | // | 310 | // |
| 313 | STD_S7_INI_BOOLEAN("suhosin.protectkey", "1", PHP_INI_SYSTEM, OnUpdateBool, protectkey) | 311 | STD_S7_INI_BOOLEAN("suhosin.protectkey", "1", PHP_INI_SYSTEM, OnUpdateBool, protectkey) |
| 314 | STD_S7_INI_BOOLEAN("suhosin.coredump", "0", PHP_INI_SYSTEM, OnUpdateBool, coredump) | 312 | STD_S7_INI_BOOLEAN("suhosin.coredump", "0", PHP_INI_SYSTEM, OnUpdateBool, coredump) |
| 315 | // STD_S7_INI_BOOLEAN("suhosin.stealth", "1", PHP_INI_SYSTEM, OnUpdateBool, stealth) | 313 | // STD_S7_INI_BOOLEAN("suhosin.stealth", "1", PHP_INI_SYSTEM, OnUpdateBool, stealth) |
| 316 | // STD_S7_INI_BOOLEAN("suhosin.apc_bug_workaround", "0", PHP_INI_SYSTEM, OnUpdateBool, apc_bug_workaround) | 314 | // STD_S7_INI_BOOLEAN("suhosin.apc_bug_workaround", "0", PHP_INI_SYSTEM, OnUpdateBool, apc_bug_workaround) |
| 317 | STD_S7_INI_BOOLEAN("suhosin.disable.display_errors", "0", PHP_INI_SYSTEM, OnUpdate_disable_display_errors, disable_display_errors) | 315 | STD_S7_INI_BOOLEAN("suhosin.disable.display_errors", "0", PHP_INI_SYSTEM, OnUpdate_disable_display_errors, disable_display_errors) |
| 318 | 316 | ||
| 319 | 317 | ||
| 320 | // | 318 | // |
| 321 | STD_S7_INI_ENTRY("suhosin.request.max_vars", "1000", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateRequestLong, max_request_variables) | 319 | STD_S7_INI_ENTRY("suhosin.request.max_vars", "1000", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateRequestLong, max_request_variables) |
| 322 | STD_S7_INI_ENTRY("suhosin.request.max_varname_length", "64", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateRequestLong, max_varname_length) | 320 | STD_S7_INI_ENTRY("suhosin.request.max_varname_length", "64", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateRequestLong, max_varname_length) |
| 323 | STD_S7_INI_ENTRY("suhosin.request.max_value_length", "1000000", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateRequestLong, max_value_length) | 321 | STD_S7_INI_ENTRY("suhosin.request.max_value_length", "1000000", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateRequestLong, max_value_length) |
| @@ -328,7 +326,7 @@ PHP_INI_BEGIN() | |||
| 328 | STD_S7_INI_ENTRY("suhosin.request.array_index_char_blacklist", "'\"+<>;()", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateRequestString, array_index_blacklist) | 326 | STD_S7_INI_ENTRY("suhosin.request.array_index_char_blacklist", "'\"+<>;()", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateRequestString, array_index_blacklist) |
| 329 | STD_S7_INI_ENTRY("suhosin.request.disallow_nul", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateRequestBool, disallow_nul) | 327 | STD_S7_INI_ENTRY("suhosin.request.disallow_nul", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateRequestBool, disallow_nul) |
| 330 | STD_S7_INI_ENTRY("suhosin.request.disallow_ws", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateRequestBool, disallow_ws) | 328 | STD_S7_INI_ENTRY("suhosin.request.disallow_ws", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateRequestBool, disallow_ws) |
| 331 | // | 329 | // |
| 332 | STD_S7_INI_ENTRY("suhosin.cookie.max_vars", "100", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateCookieLong, max_cookie_vars) | 330 | STD_S7_INI_ENTRY("suhosin.cookie.max_vars", "100", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateCookieLong, max_cookie_vars) |
| 333 | STD_S7_INI_ENTRY("suhosin.cookie.max_name_length", "64", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateCookieLong, max_cookie_name_length) | 331 | STD_S7_INI_ENTRY("suhosin.cookie.max_name_length", "64", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateCookieLong, max_cookie_name_length) |
| 334 | STD_S7_INI_ENTRY("suhosin.cookie.max_totalname_length", "256", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateCookieLong, max_cookie_totalname_length) | 332 | STD_S7_INI_ENTRY("suhosin.cookie.max_totalname_length", "256", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateCookieLong, max_cookie_totalname_length) |
| @@ -337,7 +335,7 @@ PHP_INI_BEGIN() | |||
| 337 | STD_S7_INI_ENTRY("suhosin.cookie.max_array_index_length", "64", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateCookieLong, max_cookie_array_index_length) | 335 | STD_S7_INI_ENTRY("suhosin.cookie.max_array_index_length", "64", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateCookieLong, max_cookie_array_index_length) |
| 338 | STD_S7_INI_ENTRY("suhosin.cookie.disallow_nul", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateCookieBool, disallow_cookie_nul) | 336 | STD_S7_INI_ENTRY("suhosin.cookie.disallow_nul", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateCookieBool, disallow_cookie_nul) |
| 339 | STD_S7_INI_ENTRY("suhosin.cookie.disallow_ws", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateCookieBool, disallow_cookie_ws) | 337 | STD_S7_INI_ENTRY("suhosin.cookie.disallow_ws", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateCookieBool, disallow_cookie_ws) |
| 340 | // | 338 | // |
| 341 | STD_S7_INI_ENTRY("suhosin.get.max_vars", "100", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateGetLong, max_get_vars) | 339 | STD_S7_INI_ENTRY("suhosin.get.max_vars", "100", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateGetLong, max_get_vars) |
| 342 | STD_S7_INI_ENTRY("suhosin.get.max_name_length", "64", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateGetLong, max_get_name_length) | 340 | STD_S7_INI_ENTRY("suhosin.get.max_name_length", "64", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateGetLong, max_get_name_length) |
| 343 | STD_S7_INI_ENTRY("suhosin.get.max_totalname_length", "256", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateGetLong, max_get_totalname_length) | 341 | STD_S7_INI_ENTRY("suhosin.get.max_totalname_length", "256", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateGetLong, max_get_totalname_length) |
| @@ -346,7 +344,7 @@ PHP_INI_BEGIN() | |||
| 346 | STD_S7_INI_ENTRY("suhosin.get.max_array_index_length", "64", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateGetLong, max_get_array_index_length) | 344 | STD_S7_INI_ENTRY("suhosin.get.max_array_index_length", "64", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateGetLong, max_get_array_index_length) |
| 347 | STD_S7_INI_ENTRY("suhosin.get.disallow_nul", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateGetBool, disallow_get_nul) | 345 | STD_S7_INI_ENTRY("suhosin.get.disallow_nul", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateGetBool, disallow_get_nul) |
| 348 | STD_S7_INI_ENTRY("suhosin.get.disallow_ws", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateGetBool, disallow_get_ws) | 346 | STD_S7_INI_ENTRY("suhosin.get.disallow_ws", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateGetBool, disallow_get_ws) |
| 349 | // | 347 | // |
| 350 | STD_S7_INI_ENTRY("suhosin.post.max_vars", "1000", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdatePostLong, max_post_vars) | 348 | STD_S7_INI_ENTRY("suhosin.post.max_vars", "1000", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdatePostLong, max_post_vars) |
| 351 | STD_S7_INI_ENTRY("suhosin.post.max_name_length", "64", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdatePostLong, max_post_name_length) | 349 | STD_S7_INI_ENTRY("suhosin.post.max_name_length", "64", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdatePostLong, max_post_name_length) |
| 352 | STD_S7_INI_ENTRY("suhosin.post.max_totalname_length", "256", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdatePostLong, max_post_totalname_length) | 350 | STD_S7_INI_ENTRY("suhosin.post.max_totalname_length", "256", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdatePostLong, max_post_totalname_length) |
| @@ -355,7 +353,7 @@ PHP_INI_BEGIN() | |||
| 355 | STD_S7_INI_ENTRY("suhosin.post.max_array_index_length", "64", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdatePostLong, max_post_array_index_length) | 353 | STD_S7_INI_ENTRY("suhosin.post.max_array_index_length", "64", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdatePostLong, max_post_array_index_length) |
| 356 | STD_S7_INI_ENTRY("suhosin.post.disallow_nul", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdatePostBool, disallow_post_nul) | 354 | STD_S7_INI_ENTRY("suhosin.post.disallow_nul", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdatePostBool, disallow_post_nul) |
| 357 | STD_S7_INI_ENTRY("suhosin.post.disallow_ws", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdatePostBool, disallow_post_ws) | 355 | STD_S7_INI_ENTRY("suhosin.post.disallow_ws", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdatePostBool, disallow_post_ws) |
| 358 | // | 356 | // |
| 359 | STD_S7_INI_ENTRY("suhosin.upload.max_uploads", "25", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateUploadLong, upload_limit) | 357 | STD_S7_INI_ENTRY("suhosin.upload.max_uploads", "25", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateUploadLong, upload_limit) |
| 360 | STD_S7_INI_ENTRY("suhosin.upload.max_newlines", "100", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateUploadLong, upload_max_newlines) | 358 | STD_S7_INI_ENTRY("suhosin.upload.max_newlines", "100", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateUploadLong, upload_max_newlines) |
| 361 | STD_S7_INI_ENTRY("suhosin.upload.disallow_elf", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateUploadBool, upload_disallow_elf) | 359 | STD_S7_INI_ENTRY("suhosin.upload.disallow_elf", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateUploadBool, upload_disallow_elf) |
| @@ -403,7 +401,7 @@ PHP_INI_BEGIN() | |||
| 403 | // | 401 | // |
| 404 | STD_S7_INI_BOOLEAN("suhosin.server.encode", "1", PHP_INI_SYSTEM, OnUpdateBool, server_encode) | 402 | STD_S7_INI_BOOLEAN("suhosin.server.encode", "1", PHP_INI_SYSTEM, OnUpdateBool, server_encode) |
| 405 | STD_S7_INI_BOOLEAN("suhosin.server.strip", "1", PHP_INI_SYSTEM, OnUpdateBool, server_strip) | 403 | STD_S7_INI_BOOLEAN("suhosin.server.strip", "1", PHP_INI_SYSTEM, OnUpdateBool, server_strip) |
| 406 | // | 404 | // |
| 407 | STD_S7_INI_ENTRY("suhosin.rand.seedingkey", "", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateMiscString, seedingkey) | 405 | STD_S7_INI_ENTRY("suhosin.rand.seedingkey", "", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateMiscString, seedingkey) |
| 408 | STD_S7_INI_BOOLEAN("suhosin.rand.reseed_every_request", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateMiscBool, reseed_every_request) | 406 | STD_S7_INI_BOOLEAN("suhosin.rand.reseed_every_request", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateMiscBool, reseed_every_request) |
| 409 | STD_S7_INI_BOOLEAN("suhosin.srand.ignore", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateMiscBool, srand_ignore) | 407 | STD_S7_INI_BOOLEAN("suhosin.srand.ignore", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateMiscBool, srand_ignore) |
| @@ -428,7 +426,7 @@ char *suhosin_getenv(char *name, size_t name_len) | |||
| 428 | } else { | 426 | } else { |
| 429 | /* fallback to the system's getenv() function */ | 427 | /* fallback to the system's getenv() function */ |
| 430 | char *tmp; | 428 | char *tmp; |
| 431 | 429 | ||
| 432 | name = estrndup(name, name_len); | 430 | name = estrndup(name, name_len); |
| 433 | tmp = getenv(name); | 431 | tmp = getenv(name); |
| 434 | efree(name); | 432 | efree(name); |
| @@ -476,7 +474,7 @@ PHP_MINIT_FUNCTION(suhosin7) | |||
| 476 | REGISTER_MAIN_LONG_CONSTANT("S_ALL", S_ALL, CONST_PERSISTENT | CONST_CS); | 474 | REGISTER_MAIN_LONG_CONSTANT("S_ALL", S_ALL, CONST_PERSISTENT | CONST_CS); |
| 477 | 475 | ||
| 478 | REGISTER_INI_ENTRIES(); | 476 | REGISTER_INI_ENTRIES(); |
| 479 | 477 | ||
| 480 | #if !defined(HAVE_PHP_SESSION) && !defined(SUHOSIN_NO_SESSION_WARNING) | 478 | #if !defined(HAVE_PHP_SESSION) && !defined(SUHOSIN_NO_SESSION_WARNING) |
| 481 | php_error_docref(NULL, E_WARNING, "Suhosin was compiled without session support, which is probably not what you want. All session related features will not be available, e.g. session encryption. If session support is really not needed, recompile Suhosin with -DSUHOSIN_NO_SESSION_WARNING=1 to suppress this warning."); | 479 | php_error_docref(NULL, E_WARNING, "Suhosin was compiled without session support, which is probably not what you want. All session related features will not be available, e.g. session encryption. If session support is really not needed, recompile Suhosin with -DSUHOSIN_NO_SESSION_WARNING=1 to suppress this warning."); |
| 482 | #endif | 480 | #endif |
| @@ -492,7 +490,7 @@ PHP_MINIT_FUNCTION(suhosin7) | |||
| 492 | if (i->on_modify) { | 490 | if (i->on_modify) { |
| 493 | i->on_modify(i, val0, i->mh_arg1, i->mh_arg2, i->mh_arg3, ZEND_INI_STAGE_STARTUP); | 491 | i->on_modify(i, val0, i->mh_arg1, i->mh_arg2, i->mh_arg3, ZEND_INI_STAGE_STARTUP); |
| 494 | } | 492 | } |
| 495 | 493 | ||
| 496 | SDEBUG("display_errors=%s", ZSTR_VAL(val0)); | 494 | SDEBUG("display_errors=%s", ZSTR_VAL(val0)); |
| 497 | if (SUHOSIN7_G(disable_display_errors) >= 2) { | 495 | if (SUHOSIN7_G(disable_display_errors) >= 2) { |
| 498 | i->modified = 0; | 496 | i->modified = 0; |
| @@ -565,9 +563,9 @@ PHP_RINIT_FUNCTION(suhosin7) | |||
| 565 | PHP_RSHUTDOWN_FUNCTION(suhosin7) | 563 | PHP_RSHUTDOWN_FUNCTION(suhosin7) |
| 566 | { | 564 | { |
| 567 | SDEBUG("(RSHUTDOWN)"); | 565 | SDEBUG("(RSHUTDOWN)"); |
| 568 | /* We need to clear the input filtering | 566 | /* We need to clear the input filtering |
| 569 | variables in the request shutdown | 567 | variables in the request shutdown |
| 570 | because input filtering is done before | 568 | because input filtering is done before |
| 571 | RINIT */ | 569 | RINIT */ |
| 572 | 570 | ||
| 573 | SUHOSIN7_G(cur_request_variables) = 0; | 571 | SUHOSIN7_G(cur_request_variables) = 0; |
| @@ -621,7 +619,7 @@ PHP_MINFO_FUNCTION(suhosin7) | |||
| 621 | php_info_print_box_start(0); | 619 | php_info_print_box_start(0); |
| 622 | if (!sapi_module.phpinfo_as_text) { | 620 | if (!sapi_module.phpinfo_as_text) { |
| 623 | zend_string *enc_logo; | 621 | zend_string *enc_logo; |
| 624 | 622 | ||
| 625 | PUTS("<a href=\"http://www.suhosin.org/\"><img border=\"0\" src=\"data:image/jpeg;base64,"); | 623 | PUTS("<a href=\"http://www.suhosin.org/\"><img border=\"0\" src=\"data:image/jpeg;base64,"); |
| 626 | enc_logo = php_base64_encode(suhosin_logo, sizeof(suhosin_logo)); | 624 | enc_logo = php_base64_encode(suhosin_logo, sizeof(suhosin_logo)); |
| 627 | if (ZSTR_LEN(enc_logo)) { | 625 | if (ZSTR_LEN(enc_logo)) { |
| @@ -659,7 +657,7 @@ PHP_MINFO_FUNCTION(suhosin7) | |||
| 659 | 657 | ||
| 660 | if (SUHOSIN7_G(protectkey)) { | 658 | if (SUHOSIN7_G(protectkey)) { |
| 661 | php_ini_entry *i; | 659 | php_ini_entry *i; |
| 662 | 660 | ||
| 663 | if ((i=zend_hash_str_find_ptr(EG(ini_directives), ZEND_STRL("suhosin.cookie.cryptkey")))) { | 661 | if ((i=zend_hash_str_find_ptr(EG(ini_directives), ZEND_STRL("suhosin.cookie.cryptkey")))) { |
| 664 | i->displayer = NULL; | 662 | i->displayer = NULL; |
| 665 | } | 663 | } |
