- fixed: PHP notices and warnings

- fixed: security vulnerability with User Account page and password field
This commit is contained in:
nikitasinelnikov
2021-03-03 13:13:44 +02:00
parent 16bdc0cf9c
commit 5740bc637d
7 changed files with 34 additions and 6 deletions
@@ -146,7 +146,7 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
*/
function forumwp_fix() {
if ( function_exists( 'FMWP' ) ) {
remove_filter( 'single_template', array( FMWP()->shortcodes(), 'cpt_template' ) );
remove_filter( 'single_template', array( FMWP()->frontend()->shortcodes(), 'cpt_template' ) );
}
}
+3
View File
@@ -3741,11 +3741,14 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
$sort_col = array();
foreach ( $arr as $key => $row ) {
if ( $key == 'form_id' ) {
unset( $arr['form_id'] );
continue;
}
if ( isset( $row[ $col ] ) ) {
$sort_col[ $key ] = $row[ $col ];
} else {
unset( $arr[ $key ] );
}
}
+4
View File
@@ -276,6 +276,10 @@ function um_submit_account_details( $args ) {
continue;
}
if ( $k == 'single_user_password' ) {
continue;
}
$changes[ $k ] = $v;
}
+13
View File
@@ -441,7 +441,20 @@ function um_get_custom_field_array( $array, $fields ) {
if ( ! empty( $array['conditions'] ) ) {
foreach ( $array['conditions'] as $key => $value ) {
if ( ! isset( $value[1] ) ) {
continue;
}
if ( empty( $fields[ $value[1] ] ) ) {
continue;
}
if ( empty( $fields[ $value[1] ]['metakey'] ) ) {
continue;
}
$condition_metakey = $fields[ $value[1] ]['metakey'];
if ( isset( $_POST[ $condition_metakey ] ) ) {
$cond_value = ( $fields[ $value[1] ]['type'] == 'radio' ) ? $_POST[ $condition_metakey ][0] : $_POST[ $condition_metakey ];
list( $visibility, $parent_key, $op, $parent_value ) = $value;