Skip to content

Commit 236725a

Browse files
authored
Updates
1 parent db6acf1 commit 236725a

3 files changed

Lines changed: 42 additions & 38 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
### Documentation Workflow Updates
55
- **Version Control**: Removed `changelog.txt` file to streamline documentation; maintaining only `readme.txt` (WordPress.org) and `CHANGELOG.md` (developers)
66

7+
### Code Standards Compliance
8+
- **Indentation**: Fixed tab indentation violations in `sse_handle_secure_download()` and `sse_handle_export_deletion()` functions to use spaces as required by WordPress coding standards
9+
710
## 1.8.0 - June 26, 2025
811
### WordPress Standards Compliance Enhancement
912
- **WordPress Baseline**: Updated minimum WordPress version requirement from 6.0 to 6.5+ for better compatibility

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
9292
= Unreleased =
9393
* **Documentation Workflow**: Removed changelog.txt file to streamline documentation process
9494
* **Version Control**: Maintaining only readme.txt (WordPress.org) and CHANGELOG.md (developers) for changelog management
95+
* **Code Standards**: Fixed tab indentation violations to use spaces as required by WordPress coding standards
9596

9697
= 1.7.0 =
9798
* **SECURITY FIX**: Resolved Server-Side Request Forgery (SSRF) vulnerability in path validation

simple-wp-site-exporter.php

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,27 +1232,27 @@ function sse_validate_file_deletion($filename) {
12321232
* @return void
12331233
*/
12341234
function sse_handle_secure_download() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
1235-
if ( ! isset( $_GET['sse_secure_download'] ) || ! isset( $_GET['sse_download_nonce'] ) ) {
1236-
return;
1237-
}
1235+
if ( ! isset( $_GET['sse_secure_download'] ) || ! isset( $_GET['sse_download_nonce'] ) ) {
1236+
return;
1237+
}
12381238

1239-
// Verify nonce.
1240-
$nonce = sanitize_text_field( wp_unslash( $_GET['sse_download_nonce'] ) );
1241-
if ( ! wp_verify_nonce( $nonce, 'sse_secure_download' ) ) {
1242-
wp_die( esc_html__( 'Security check failed. Please try again.', 'Simple-WP-Site-Exporter' ), 403 );
1243-
}
1239+
// Verify nonce.
1240+
$nonce = sanitize_text_field( wp_unslash( $_GET['sse_download_nonce'] ) );
1241+
if ( ! wp_verify_nonce( $nonce, 'sse_secure_download' ) ) {
1242+
wp_die( esc_html__( 'Security check failed. Please try again.', 'Simple-WP-Site-Exporter' ), 403 );
1243+
}
12441244

1245-
// Verify user capabilities.
1246-
if ( ! current_user_can( 'manage_options' ) ) {
1247-
wp_die( esc_html__( 'You do not have permission to download export files.', 'Simple-WP-Site-Exporter' ), 403 );
1248-
}
1245+
// Verify user capabilities.
1246+
if ( ! current_user_can( 'manage_options' ) ) {
1247+
wp_die( esc_html__( 'You do not have permission to download export files.', 'Simple-WP-Site-Exporter' ), 403 );
1248+
}
12491249

1250-
$filename = sanitize_file_name( wp_unslash( $_GET['sse_secure_download'] ) );
1251-
$validation = sse_validate_download_request( $filename );
1250+
$filename = sanitize_file_name( wp_unslash( $_GET['sse_secure_download'] ) );
1251+
$validation = sse_validate_download_request( $filename );
12521252

1253-
if ( is_wp_error( $validation ) ) {
1254-
wp_die( esc_html( $validation->get_error_message() ), 404 );
1255-
}
1253+
if ( is_wp_error( $validation ) ) {
1254+
wp_die( esc_html( $validation->get_error_message() ), 404 );
1255+
}
12561256

12571257
// Rate limiting check
12581258
if ( ! sse_check_download_rate_limit() ) {
@@ -1269,27 +1269,27 @@ function sse_handle_secure_download() { // phpcs:ignore WordPress.Security.Nonce
12691269
* @return void
12701270
*/
12711271
function sse_handle_export_deletion() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
1272-
if ( ! isset( $_GET['sse_delete_export'] ) || ! isset( $_GET['sse_delete_nonce'] ) ) {
1273-
return;
1274-
}
1275-
1276-
// Verify nonce.
1277-
$nonce = sanitize_text_field( wp_unslash( $_GET['sse_delete_nonce'] ) );
1278-
if ( ! wp_verify_nonce( $nonce, 'sse_delete_export' ) ) {
1279-
wp_die( esc_html__( 'Security check failed. Please try again.', 'Simple-WP-Site-Exporter' ), 403 );
1280-
}
1281-
1282-
// Verify user capabilities.
1283-
if ( ! current_user_can( 'manage_options' ) ) {
1284-
wp_die( esc_html__( 'You do not have permission to delete export files.', 'Simple-WP-Site-Exporter' ), 403 );
1285-
}
1286-
1287-
$filename = sanitize_file_name( wp_unslash( $_GET['sse_delete_export'] ) );
1288-
$validation = sse_validate_file_deletion( $filename );
1289-
1290-
if ( is_wp_error( $validation ) ) {
1291-
wp_die( esc_html( $validation->get_error_message() ), 404 );
1292-
}
1272+
if ( ! isset( $_GET['sse_delete_export'] ) || ! isset( $_GET['sse_delete_nonce'] ) ) {
1273+
return;
1274+
}
1275+
1276+
// Verify nonce.
1277+
$nonce = sanitize_text_field( wp_unslash( $_GET['sse_delete_nonce'] ) );
1278+
if ( ! wp_verify_nonce( $nonce, 'sse_delete_export' ) ) {
1279+
wp_die( esc_html__( 'Security check failed. Please try again.', 'Simple-WP-Site-Exporter' ), 403 );
1280+
}
1281+
1282+
// Verify user capabilities.
1283+
if ( ! current_user_can( 'manage_options' ) ) {
1284+
wp_die( esc_html__( 'You do not have permission to delete export files.', 'Simple-WP-Site-Exporter' ), 403 );
1285+
}
1286+
1287+
$filename = sanitize_file_name( wp_unslash( $_GET['sse_delete_export'] ) );
1288+
$validation = sse_validate_file_deletion( $filename );
1289+
1290+
if ( is_wp_error( $validation ) ) {
1291+
wp_die( esc_html( $validation->get_error_message() ), 404 );
1292+
}
12931293

12941294
if ( sse_safely_delete_file( $validation['filepath'] ) ) {
12951295
add_action( 'admin_notices', function() {

0 commit comments

Comments
 (0)