]> granicus.if.org Git - php/commitdiff
MFH: input validation
authorIlia Alshanetsky <iliaa@php.net>
Mon, 15 Aug 2005 16:06:08 +0000 (16:06 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 15 Aug 2005 16:06:08 +0000 (16:06 +0000)
ext/standard/info.c

index 6a80b7814301bbaef308e9796c02ce4a46502f32..3ba26c101e5a2a55aeb33cf999a3571187b41e95 100644 (file)
@@ -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("<pre>");
                                }
+                               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("</pre>");
                                }