Skip to content

Commit 049e677

Browse files
authored
Minor Updates
1 parent 4a49750 commit 049e677

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,6 @@ You must read files completely and thoroughly, with a minimum of 2000 lines per
154154

155155
- After completing a task:
156156
- Review your changes to ensure they have met the WordPress coding standards and best practices.
157+
- Ensure all changes are documented in the changelog files.
157158
- Perform a final check to ensure we have not introduced any security vulnerabilities such as XSS, CSRF, or SQL injection.
158159
- In the chat interface, deliver a summary of the security checks performed, including any potential vulnerabilities identified and how they were addressed. Do not allow yourself to skip this step as it is crucial for maintaining the security and integrity of the codebase.

simple-wp-site-exporter.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ function sse_get_upload_directory_info() {
930930

931931
/**
932932
* Validates parent directory path safety.
933-
*
933+
*
934934
* @param string $parent_dir The parent directory path.
935935
* @param string $upload_dir The upload directory path.
936936
* @return bool True if safe, false otherwise.
@@ -956,7 +956,7 @@ function sse_validate_parent_directory_safety( $parent_dir, $upload_dir ) {
956956

957957
/**
958958
* Resolves and validates parent directory.
959-
*
959+
*
960960
* @param string $parent_dir The parent directory path.
961961
* @param string $upload_dir The upload directory path.
962962
* @return string|false Real parent directory path or false on failure.
@@ -997,7 +997,7 @@ function sse_resolve_parent_directory( $parent_dir, $upload_dir ) {
997997

998998
/**
999999
* Sanitizes filename to prevent directory traversal.
1000-
*
1000+
*
10011001
* @param string $filename The filename to sanitize.
10021002
* @return string|false Sanitized filename or false on failure.
10031003
*/
@@ -1013,7 +1013,7 @@ function sse_sanitize_filename( $filename ) {
10131013

10141014
/**
10151015
* Checks if a file path is within the allowed base directory.
1016-
*
1016+
*
10171017
* @param string|false $real_file_path The real file path or false if resolution failed.
10181018
* @param string $real_base_dir The real base directory path.
10191019
* @return bool True if the file is within the base directory, false otherwise.
@@ -1039,7 +1039,7 @@ function sse_check_path_within_base( $real_file_path, $real_base_dir ) {
10391039

10401040
/**
10411041
* Validate that a file path is within the allowed directory.
1042-
*
1042+
*
10431043
* @param string $file_path The file path to validate.
10441044
* @param string $base_dir The base directory that the file should be within.
10451045
* @return bool True if the file path is safe, false otherwise.
@@ -1070,7 +1070,7 @@ function sse_validate_filepath( $file_path, $base_dir ) {
10701070

10711071
/**
10721072
* Validates export file for download operations.
1073-
*
1073+
*
10741074
* @param string $filename The filename to validate.
10751075
* @return array|WP_Error Result array with file data or WP_Error on failure.
10761076
*/
@@ -1100,7 +1100,7 @@ function sse_validate_export_file_for_download( $filename ) {
11001100

11011101
/**
11021102
* Validates export file for deletion operations.
1103-
*
1103+
*
11041104
* @param string $filename The filename to validate.
11051105
* @return array|WP_Error Result array with file data or WP_Error on failure.
11061106
*/
@@ -1110,7 +1110,7 @@ function sse_validate_export_file_for_deletion( $filename ) {
11101110

11111111
/**
11121112
* Performs basic validation common to both download and deletion operations.
1113-
*
1113+
*
11141114
* @param string $filename The filename to validate.
11151115
* @return array|WP_Error Result array with file data or WP_Error on failure.
11161116
*/
@@ -1228,7 +1228,7 @@ function sse_validate_request_referer() {
12281228

12291229
/**
12301230
* Validate export download request parameters.
1231-
*
1231+
*
12321232
* @param string $filename The filename to validate.
12331233
* @return array|WP_Error Result array with file path and size or WP_Error on failure.
12341234
*/
@@ -1434,7 +1434,7 @@ function sse_validate_download_file_access( $filepath ) {
14341434

14351435
/**
14361436
* Sets appropriate headers for file download.
1437-
*
1437+
*
14381438
* @param string $filename The filename for download.
14391439
* @param int $filesize The file size in bytes.
14401440
* @return void
@@ -1473,7 +1473,7 @@ function sse_set_download_headers( $filename, $filesize ) {
14731473

14741474
/**
14751475
* Validates file output security before serving download.
1476-
*
1476+
*
14771477
* @param string $filepath The file path to validate.
14781478
* @return bool True if file passes security checks, false otherwise.
14791479
*/
@@ -1502,7 +1502,7 @@ function sse_validate_file_output_security( $filepath ) {
15021502

15031503
/**
15041504
* Outputs file content for download using WordPress filesystem.
1505-
*
1505+
*
15061506
* @param string $filepath The validated file path.
15071507
* @param string $filename The filename for logging.
15081508
* @return void

0 commit comments

Comments
 (0)