PluginProbe
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP / 1.2.74
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP v1.2.74
1.2.74 1.2.73 1.2.72 1.2.71 1.2.70 1.2.69 1.2.68 1.2.67 1.2.66 1.2.65 1.2.64 1.2.63 trunk 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.20 1.0.21 All 174 releases
← All changes | includes/helpers/misc.php +12 -3 1.2.671.2.74 View file →
@@ -1472,9 +1472,10 @@
1472 1472 'forgot_modal' => uwp_get_option("design_style", 'bootstrap') == 'bootstrap' && uwp_get_option("forgot_modal", 1) ? 1 : '',
1473 1473 'uwp_pass_strength' => uwp_get_option("register_min_password_strength", 0),
1474 1474 'uwp_strong_pass_msg' => !empty($pass_msg) ? $pass_msg : __("Please enter valid strong password.", "userswp"),
1475 1475 'default_banner' => uwp_get_default_banner_uri(),
1476 - 'basicNonce' => esc_attr(wp_create_nonce('uwp_basic_nonce'))
1476 + 'basicNonce' => esc_attr(wp_create_nonce('uwp_basic_nonce')),
1477 + 'wordfence_2fa_active' => ( class_exists( '\WordfenceLS\Controller_Users' ) && class_exists( '\WordfenceLS\Controller_TOTP' ) ) ? 1 : ''
1477 1478 );
1478 1479
1479 1480 return apply_filters('uwp_localize_data', $uwp_localize_data);
1480 1481 }
@@ -2102,15 +2103,23 @@
2102 2103 $relative_url = $upload_baseurl . '/' . $match_url;
2103 2104 }
2104 2105 }
2105 2106 } else {
2107 + if ( substr_count( $match_url, $match_upload_baseurl ) > 1 || substr_count( $match_url, $match_content_url ) > 1 ) {
2108 + return '';
2109 + }
2110 +
2106 2111 if ( strpos( $match_url, $match_upload_baseurl ) === 0 ) { // url contains uploads baseurl
2107 - $relative_url = str_replace( $match_upload_baseurl, '', $match_url );
2112 + $relative_url = substr( $match_url, strlen( $match_upload_baseurl ) );
2108 2113 } elseif ( strpos( $match_url, $match_content_url ) === 0 ) { // url contains content url
2109 - $relative_url = str_replace( $match_content_url, '', $match_url );
2114 + $relative_url = substr( $match_url, strlen( $match_content_url ) );
2110 2115 }
2111 2116
2112 2117 $relative_url = trim( $relative_url, '/\\' );
2118 +
2119 + if ( false !== strpos( $relative_url, '..' ) ) {
2120 + return '';
2121 + }
2113 2122 }
2114 2123
2115 2124 return apply_filters( 'uwp_get_file_relative_url', $relative_url, $url, $full_path );
2116 2125 }