Changeset 3391790
- Timestamp:
- 11/07/2025 02:21:51 PM (5 months ago)
- Location:
- modula-best-grid-gallery
- Files:
-
- 8 edited
- 1 copied
-
tags/2.12.29 (copied) (copied from modula-best-grid-gallery/trunk)
-
tags/2.12.29/Modula.php (modified) (2 diffs)
-
tags/2.12.29/changelog.txt (modified) (1 diff)
-
tags/2.12.29/includes/admin/class-modula-gallery-upload.php (modified) (2 diffs)
-
tags/2.12.29/readme.txt (modified) (1 diff)
-
trunk/Modula.php (modified) (2 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/includes/admin/class-modula-gallery-upload.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
modula-best-grid-gallery/tags/2.12.29/Modula.php
r3390878 r3391790 5 5 * Description: Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks. 6 6 * Author: WPChill 7 * Version: 2.12.2 87 * Version: 2.12.29 8 8 * Author URI: https://www.wpchill.com/ 9 9 * License: GPLv3 or later … … 48 48 */ 49 49 50 define( 'MODULA_LITE_VERSION', '2.12.2 8' );50 define( 'MODULA_LITE_VERSION', '2.12.29' ); 51 51 define( 'MODULA_PATH', plugin_dir_path( __FILE__ ) ); 52 52 define( 'MODULA_URL', plugin_dir_url( __FILE__ ) ); -
modula-best-grid-gallery/tags/2.12.29/changelog.txt
r3390878 r3391790 1 = 2.12.29 - 07.11.2025 = 2 Fixed: Security issue. 3 1 4 = 2.12.28 - 05.11.2025 = 2 5 Added: Filters to exclude Modula JS files from third-party optimization plugins. -
modula-best-grid-gallery/tags/2.12.29/includes/admin/class-modula-gallery-upload.php
r3292565 r3391790 565 565 } 566 566 567 $file = wp_unslash( $_POST['file'] ); 568 $delete_file = 'false' === sanitize_text_field( wp_unslash( $_POST['delete_files'] ) ) ? false : true; 569 570 $attachment_id = $this->upload_image( $file, $delete_file ); 567 $file = wp_unslash( $_POST['file'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 568 569 $real_path = realpath( $file ); 570 $uploads_dir = wp_upload_dir(); 571 $allowed_base = realpath( $uploads_dir['basedir'] ); 572 573 if ( false === $real_path || false === $allowed_base || 0 !== strpos( $real_path, $allowed_base ) ) { 574 wp_send_json_error( __( 'Invalid file path.', 'modula-best-grid-gallery' ) ); 575 } 576 577 if ( ! file_exists( $real_path ) || ! is_readable( $real_path ) ) { 578 wp_send_json_error( __( 'File does not exist or is not readable.', 'modula-best-grid-gallery' ) ); 579 } 580 581 $delete_file = isset( $_POST['delete_files'] ) && 'false' !== sanitize_text_field( wp_unslash( $_POST['delete_files'] ) ) ? true : false; 582 583 $attachment_id = $this->upload_image( $real_path, $delete_file ); 571 584 if ( ! $attachment_id ) { 572 $prev_uploaded_files = $this->get_uploaded_error_files( absint( $_POST['post_ID'] ) ); 573 $uploaded_files['files'][] = $_POST['file']; 574 $this->update_uploaded_error_files( absint( $_POST['post_ID'] ), array_merge( $prev_uploaded_files, $uploaded_files ) ); 585 $post_id = isset( $_POST['post_ID'] ) ? absint( $_POST['post_ID'] ) : 0; 586 if ( $post_id > 0 ) { 587 $prev_uploaded_files = $this->get_uploaded_error_files( $post_id ); 588 $uploaded_files['files'][] = $file; 589 $this->update_uploaded_error_files( $post_id, array_merge( $prev_uploaded_files, $uploaded_files ) ); 590 } 575 591 wp_send_json_error( __( 'The file could not be uploaded.', 'modula-best-grid-gallery' ) ); 576 592 } … … 1152 1168 } 1153 1169 1154 private function delete_atachment( $file_id, $force ) {1170 private function delete_atachment( $file_id, $force ) { 1155 1171 if ( ! current_user_can( 'delete_post', $file_id ) ) { 1156 1172 return false; -
modula-best-grid-gallery/tags/2.12.29/readme.txt
r3390878 r3391790 323 323 324 324 == Changelog == 325 = 2.12.29 - 07.11.2025 = 326 Fixed: Security issue. 327 325 328 = 2.12.28 - 05.11.2025 = 326 329 Added: Filters to exclude Modula JS files from third-party optimization plugins. -
modula-best-grid-gallery/trunk/Modula.php
r3390878 r3391790 5 5 * Description: Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks. 6 6 * Author: WPChill 7 * Version: 2.12.2 87 * Version: 2.12.29 8 8 * Author URI: https://www.wpchill.com/ 9 9 * License: GPLv3 or later … … 48 48 */ 49 49 50 define( 'MODULA_LITE_VERSION', '2.12.2 8' );50 define( 'MODULA_LITE_VERSION', '2.12.29' ); 51 51 define( 'MODULA_PATH', plugin_dir_path( __FILE__ ) ); 52 52 define( 'MODULA_URL', plugin_dir_url( __FILE__ ) ); -
modula-best-grid-gallery/trunk/changelog.txt
r3390878 r3391790 1 = 2.12.29 - 07.11.2025 = 2 Fixed: Security issue. 3 1 4 = 2.12.28 - 05.11.2025 = 2 5 Added: Filters to exclude Modula JS files from third-party optimization plugins. -
modula-best-grid-gallery/trunk/includes/admin/class-modula-gallery-upload.php
r3292565 r3391790 565 565 } 566 566 567 $file = wp_unslash( $_POST['file'] ); 568 $delete_file = 'false' === sanitize_text_field( wp_unslash( $_POST['delete_files'] ) ) ? false : true; 569 570 $attachment_id = $this->upload_image( $file, $delete_file ); 567 $file = wp_unslash( $_POST['file'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 568 569 $real_path = realpath( $file ); 570 $uploads_dir = wp_upload_dir(); 571 $allowed_base = realpath( $uploads_dir['basedir'] ); 572 573 if ( false === $real_path || false === $allowed_base || 0 !== strpos( $real_path, $allowed_base ) ) { 574 wp_send_json_error( __( 'Invalid file path.', 'modula-best-grid-gallery' ) ); 575 } 576 577 if ( ! file_exists( $real_path ) || ! is_readable( $real_path ) ) { 578 wp_send_json_error( __( 'File does not exist or is not readable.', 'modula-best-grid-gallery' ) ); 579 } 580 581 $delete_file = isset( $_POST['delete_files'] ) && 'false' !== sanitize_text_field( wp_unslash( $_POST['delete_files'] ) ) ? true : false; 582 583 $attachment_id = $this->upload_image( $real_path, $delete_file ); 571 584 if ( ! $attachment_id ) { 572 $prev_uploaded_files = $this->get_uploaded_error_files( absint( $_POST['post_ID'] ) ); 573 $uploaded_files['files'][] = $_POST['file']; 574 $this->update_uploaded_error_files( absint( $_POST['post_ID'] ), array_merge( $prev_uploaded_files, $uploaded_files ) ); 585 $post_id = isset( $_POST['post_ID'] ) ? absint( $_POST['post_ID'] ) : 0; 586 if ( $post_id > 0 ) { 587 $prev_uploaded_files = $this->get_uploaded_error_files( $post_id ); 588 $uploaded_files['files'][] = $file; 589 $this->update_uploaded_error_files( $post_id, array_merge( $prev_uploaded_files, $uploaded_files ) ); 590 } 575 591 wp_send_json_error( __( 'The file could not be uploaded.', 'modula-best-grid-gallery' ) ); 576 592 } … … 1152 1168 } 1153 1169 1154 private function delete_atachment( $file_id, $force ) {1170 private function delete_atachment( $file_id, $force ) { 1155 1171 if ( ! current_user_can( 'delete_post', $file_id ) ) { 1156 1172 return false; -
modula-best-grid-gallery/trunk/readme.txt
r3390878 r3391790 323 323 324 324 == Changelog == 325 = 2.12.29 - 07.11.2025 = 326 Fixed: Security issue. 327 325 328 = 2.12.28 - 05.11.2025 = 326 329 Added: Filters to exclude Modula JS files from third-party optimization plugins.
Note: See TracChangeset
for help on using the changeset viewer.