From c4dffe672ad73c45a4e0469d51d6e06c59f13553 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Mon, 15 Aug 2005 16:06:08 +0000 Subject: [PATCH] MFH: input validation --- ext/standard/info.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ext/standard/info.c b/ext/standard/info.c index 6a80b78143..3ba26c101e 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -133,10 +133,21 @@ static void php_print_gpcse_array(char *name, uint name_length TSRMLS_DC) PUTS(" => "); } if (Z_TYPE_PP(tmp) == IS_ARRAY) { + zval *tmp3; + MAKE_STD_ZVAL(tmp3); if (!sapi_module.phpinfo_as_text) { PUTS("
");
 				}
+				php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC);
 				zend_print_zval_r(*tmp, 0);
+				php_ob_get_buffer(tmp3 TSRMLS_CC);
+				php_end_ob_buffer(0, 0 TSRMLS_CC);
+				
+				elem_esc = php_info_html_esc(Z_STRVAL_P(tmp3) TSRMLS_CC);
+				PUTS(elem_esc);
+				efree(elem_esc);
+				zval_ptr_dtor(&tmp3);
+
 				if (!sapi_module.phpinfo_as_text) {
 					PUTS("
"); } -- 2.40.0