Skip to content

Commit 8edac67

Browse files
authored
Merge pull request #874 from wpdev10/master
Fix Max entries per csv file option in Import/Export setting not show…
2 parents bbbe10c + e4f5208 commit 8edac67

3 files changed

Lines changed: 23 additions & 5 deletions

File tree

admin/views/html-admin-settings-import-export-users.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
$uwp_chunk_sizes = apply_filters('uwp_ie_csv_chunks_options', $uwp_chunk_sizes);
110110
$uwp_chunk_sizes_opts = '';
111111
foreach ($uwp_chunk_sizes as $value => $title) {
112-
$uwp_chunk_sizes_opts .= '<option value="' . $value . '" ' . selected($value, 5000, false) . '>' . $title . '</option>';
112+
$uwp_chunk_sizes_opts .= '<option value="' . esc_attr($value) . '" ' . selected($value, 5000, false) . '>' . esc_attr($title) . '</option>';
113113
}
114114

115115
$users_count = count_users();
@@ -124,7 +124,7 @@
124124
<tbody>
125125
<tr>
126126
<th class=""><label for="uwp_ie_chunk_size"><?php esc_html_e( 'Max entries per csv file:', 'userswp' );?></label></th>
127-
<td><select name="uwp_ie_chunk_size" class="aui-select2" id="uwp_ie_chunk_size" data-ucount = "<?php echo esc_attr( $total_users );?>" style="min-width:140px"><?php echo esc_attr( $uwp_chunk_sizes_opts );?></select><p class="description"><?php esc_html_e( 'The maximum number of entries per csv file (default to 5000, you might want to lower this to prevent memory issues.)', 'userswp' );?></p></td>
127+
<td><select name="uwp_ie_chunk_size" class="aui-select2" id="uwp_ie_chunk_size" data-ucount = "<?php echo esc_attr( $total_users );?>" style="min-width:140px"><?php echo $uwp_chunk_sizes_opts; ?></select><p class="description"><?php esc_html_e( 'The maximum number of entries per csv file (default to 5000, you might want to lower this to prevent memory issues.)', 'userswp' );?></p></td>
128128
</tr>
129129
</tbody>
130130
</table>

includes/class-profile.php

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,8 +1509,17 @@ public function add_uwp_plupload_param( $params ) {
15091509
* @return void
15101510
*/
15111511
public function ajax_avatar_banner_upload() {
1512-
// Image upload handler
1513-
// todo: security checks
1512+
1513+
if ( ! isset( $_POST['security'] ) || ! wp_verify_nonce( $_POST['security'], 'uwp_avatar_banner_upload_nonce' ) ) {
1514+
$result['error'] = aui()->alert( array(
1515+
'type' => 'danger',
1516+
'content' => __( "Security check failed.", "userswp" )
1517+
) );
1518+
$return = json_encode( $result );
1519+
echo $return; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1520+
die();
1521+
}
1522+
15141523
$type = strip_tags( esc_sql( $_POST['uwp_popup_type'] ) );
15151524
$result = array();
15161525

@@ -1764,6 +1773,8 @@ public function crop_submit_form( $type = 'avatar' ) {
17641773

17651774
$content_wrap = $design_style == 'bootstrap' ? '.uwp-profile-image-change-modal .modal-content' : '#uwp-popup-modal-wrap';
17661775
$bg_color = apply_filters('uwp_crop_image_bg_color', '', $type);
1776+
1777+
$ajax_nonce = wp_create_nonce( 'uwp_avatar_banner_upload_nonce' );
17671778
?>
17681779

17691780
<script type="text/javascript">
@@ -1805,6 +1816,8 @@ public function crop_submit_form( $type = 'avatar' ) {
18051816
// our AJAX identifier
18061817
fd.append('action', 'uwp_avatar_banner_upload');
18071818
fd.append('uwp_popup_type', '<?php echo esc_attr( $type ); ?>');
1819+
// Add nonce for security
1820+
fd.append('security', '<?php echo esc_js( $ajax_nonce ); ?>');
18081821

18091822
$("#progressBar").show().removeClass('d-none');
18101823

@@ -1853,7 +1866,8 @@ public function crop_submit_form( $type = 'avatar' ) {
18531866
minSize: [uwp_full_width, uwp_full_height]
18541867
});
18551868
}
1856-
}
1869+
},
1870+
18571871
});
18581872
});
18591873

readme.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ Yes, you can customize it with Elementor, but also with Gutenberg, Divi, Beaver
152152

153153
== Changelog ==
154154

155+
= 1.2.54 - 2026-01-TBD =
156+
* Max entries per csv file option in Import/Export setting not showing options - FIXED
157+
* Check nonce while profile image and cover image crop - FIXED/SECURITY
158+
155159
= 1.2.53 - 2026-01-08 =
156160
* Prevent duplicate event handlers in registration form switcher causing multiple AJAX requests - FIXED
157161
* Password strength doesn't enable/disable register button based on Minimum password strength setting - FIXED

0 commit comments

Comments
 (0)