Skip to content

Commit 41b73e4

Browse files
committed
- Fixed bug #62964 (Possible XSS on "Registered stream filters" info) patch by: david at nnucomputerwhiz dot com
1 parent 5ae1983 commit 41b73e4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ext/standard/info.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ static void php_info_print_stream_hash(const char *name, HashTable *ht TSRMLS_DC
125125
zend_hash_internal_pointer_reset_ex(ht, &pos);
126126
while (zend_hash_get_current_key_ex(ht, &key, &len, NULL, 0, &pos) == HASH_KEY_IS_STRING)
127127
{
128-
php_info_print(key);
128+
if (!sapi_module.phpinfo_as_text) {
129+
php_info_print_html_esc(key, len-1);
130+
} else {
131+
php_info_print(key);
132+
}
129133
zend_hash_move_forward_ex(ht, &pos);
130134
if (zend_hash_get_current_key_ex(ht, &key, &len, NULL, 0, &pos) == HASH_KEY_IS_STRING) {
131135
php_info_print(", ");

0 commit comments

Comments
 (0)