Skip to content

Commit

Permalink
Fix reflected XSS with symbol parameter phacility#50
Browse files Browse the repository at this point in the history
Fix reflected XSS with symbol parameter phacility#50
  • Loading branch information
longxinH committed Nov 26, 2020
1 parent 2b14d1a commit ed08552
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion extension/php_xhprof.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extern zend_module_entry xhprof_module_entry;
*/

/* XHProf version */
#define XHPROF_VERSION "2.2.2-dev"
#define XHPROF_VERSION "2.2.3"

#define XHPROF_FUNC_HASH_COUNTERS_SIZE 1024

Expand Down
4 changes: 4 additions & 0 deletions xhprof_lib/utils/xhprof_lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,10 @@ function xhprof_param_init($params) {
$p = implode(',', array_filter(explode(',', $p), 'ctype_xdigit'));
}

if ($k == 'symbol') {
$p = strip_tags($p);
}

// create a global variable using the parameter name.
$GLOBALS[$k] = $p;
}
Expand Down

0 comments on commit ed08552

Please sign in to comment.