File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ Cacti CHANGELOG
22
331.2.9
44-security#3191: CVE-2020-7106 Vulnerability report: Lack of escaping on some pages can lead to XSS exposure
5+ -security#3201: Vulnerability Report: Remote Code Execution due to input validation in Performance Boost Debug Log
56-issue#3038: Minor UI issue for aggregate when 'main' div width is less than 1230px
67-issue#3136: As a extra fixing for #3060, resolve 1.2.1+ upgrade wizard failure.
78-issue#3142: Chrome sets graphs tree navigation view to width 0px
Original file line number Diff line number Diff line change @@ -1530,6 +1530,18 @@ function strip_alpha($string) {
15301530 }
15311531}
15321532
1533+ /** is_valid_pathname - takes a pathname are verifies it matches file name rules
1534+ * @arg $path - (char) the pathname to be tested
1535+ * @returns - either true or false
1536+ */
1537+ function is_valid_pathname ($ path ) {
1538+ if (preg_match ('/^([a-zA-Z0-9.- \\\:\/]+)$/ ' , trim ($ path ))) {
1539+ return true ;
1540+ } else {
1541+ return false ;
1542+ }
1543+ }
1544+
15331545/** get_full_script_path - gets the full path to the script to execute to obtain data for a
15341546 * given data source. this function does not work on SNMP actions, only script-based actions
15351547 * @arg $local_data_id - (int) the ID of the data source
Original file line number Diff line number Diff line change 109109 $ errors [9 ] = 9 ;
110110 $ continue = false ;
111111 }
112+ } elseif (get_nfilter_request_var ($ field_name ) != '' && !is_valid_pathname (get_nfilter_request_var ($ field_name ))) {
113+ $ _SESSION ['sess_error_fields ' ][$ field_name ] = $ field_name ;
114+ $ _SESSION ['sess_field_values ' ][$ field_name ] = get_nfilter_request_var ($ field_name );
115+ $ errors [36 ] = 36 ;
112116 }
113117
114118 if ($ continue ) {
You can’t perform that action at this time.
0 commit comments