Plugin Directory

Changeset 3807205


Ignore:
Timestamp:
11/17/2026 11:09:05 AM (10 hours ago)
Author:
wpswings
Message:

Released version 1.6.6

Location:
pdf-generator-for-wp
Files:
669 added
6 edited

Legend:

Unmodified
Added
Removed
  • pdf-generator-for-wp/trunk/README.txt

    r3747632 r3807205  
    44Tags: PDF, invoices, 3d flipbook, PDF generator, pdf flipbook, WordPress PDF generator
    55Requires at least: 6.7.0
    6 Tested up to: 7.1.2
     6Tested up to: 7.1
    77WC requires at least: 6.5.0
    8 WC tested up to: 11.1.2
    9 Stable tag: 1.6.5
     8WC tested up to: 11.3.0
     9Stable tag: 1.6.6
    1010Requires PHP: 7.4
    1111License: GPLv3 or later
    … …  
    261261== Changelog ==
    262262
     263= 1.6.6 - Released on 17 Nov 2026 =
     264* Enhancement : Security hardening – improved visibility checks for front-end PDF generation, so PDFs are generated only for posts the visitor is allowed to view.
     265* New : Compatibility With Latest WP (7.1) and WC (11.3.0)
     266
    263267= 1.6.5 - Released on 01 Oct 2026 =
    264268* New : PDF password protection – global password, per post type (Post / Page / Product), per category & tag, and per-item override via a metabox.
    … …  
    504508== Upgrade Notice ==
    505509
    506 = 1.6.5 - Released on 01 Oct 2026 =
    507 * New : PDF password protection – global password, per post type (Post / Page / Product), per category & tag, and per-item override via a metabox.
    508 * New : Cloud storage – auto-upload generated PDFs to the admin's Google Drive and Dropbox (OAuth connect/disconnect).
    509 * New : "Save to Google Drive" and "Save to Dropbox" buttons let visitors save a PDF to their own account.
    510 * New : Drag & drop PDF Builder – text, image, meta field and rectangle blocks, multi-page layouts, page background, watermark and 12 ready-made templates for posts, pages and products.
    511 * New : Automatic PDF regeneration – cached on-server PDFs are rebuilt when a post is saved, plus a weekly background refresh.
    512 * Enhancement : Security – PDF generation and email endpoints now check the visitor can view the post (drafts, private, password-protected and non-public post types).
    513 * Enhancement : Settings page redesign with locally bundled Poppins font.
     510= 1.6.6 - Released on 17 Nov 2026 =
     511* Enhancement : Security hardening – improved visibility checks for front-end PDF generation, so PDFs are generated only for posts the visitor is allowed to view.
     512* New : Compatibility With Latest WP (7.1.4) and WC (11.3.0)
  • pdf-generator-for-wp/trunk/common/class-pdf-generator-for-wp-common.php

    r3728108 r3807205  
    100100                        $prod_id = array_key_exists( 'id', $_GET ) ? sanitize_text_field( wp_unslash( $_GET['id'] ) ) : ''; // phpcs:ignore
    101101                        if ( ( 'genpdf' === $_GET['action'] ) && ( $prod_id ) ) { // phpcs:ignore
     102                                $prod_id = absint( $prod_id );
     103                                if ( ! $this->pgfw_current_user_can_access_post( $prod_id ) ) {
     104                                        wp_die( esc_html__( 'You are not allowed to access this document.', 'pdf-generator-for-wp' ), '', array( 'response' => 403 ) );
     105                                }
    102106                                if ( ( 'yes' === $guest_access_pdf ) && ( 'yes' === $user_access_pdf ) ) {
    103107                                        $this->pgfw_generate_pdf( $prod_id );
    … …  
    111115        }
    112116        /**
     117         * Check whether the current visitor may read a post, mirroring core's front-end rules,
     118         * before its content is rendered into a PDF from a public endpoint.
     119         *
     120         * @since 1.6.5
     121         * @param int $post_id post id.
     122         * @return bool
     123         */
     124        public function pgfw_current_user_can_access_post( $post_id ) {
     125                $post = get_post( absint( $post_id ) );
     126                if ( ! $post ) {
     127                        return false;
     128                }
     129                // Non-public post types (orders, blocks, internal CPTs) are for editors only.
     130                if ( ! is_post_type_viewable( $post->post_type ) ) {
     131                        return current_user_can( 'edit_post', $post->ID );
     132                }
     133                // Drafts, pending, private, future, trashed: core's read_post rules.
     134                if ( ! is_post_status_viewable( get_post_status( $post ) ) && ! current_user_can( 'read_post', $post->ID ) ) {
     135                        return false;
     136                }
     137                // Password-protected posts require the core post password cookie.
     138                if ( post_password_required( $post ) && ! current_user_can( 'edit_post', $post->ID ) ) {
     139                        return false;
     140                }
     141                return true;
     142        }
     143        /**
    113144         * This will generate pdf from the inputted html and data.
    114145         *
    … …  
    132163                check_ajax_referer( 'pgfw_common_nonce', 'nonce' );
    133164                $email   = array_key_exists( 'email', $_POST ) ? sanitize_text_field( wp_unslash( $_POST['email'] ) ) : '';
    134                 $post_id = array_key_exists( 'post_id', $_POST ) ? sanitize_text_field( wp_unslash( $_POST['post_id'] ) ) : '';
     165                $post_id = array_key_exists( 'post_id', $_POST ) ? absint( wp_unslash( $_POST['post_id'] ) ) : 0;
     166                if ( ! $this->pgfw_current_user_can_access_post( $post_id ) ) {
     167                        wp_die( esc_html__( 'You are not allowed to access this document.', 'pdf-generator-for-wp' ), '', array( 'response' => 403 ) );
     168                }
    135169                if ( 'use_account_email' === $email ) {
    136170                        $current_user = wp_get_current_user();
  • pdf-generator-for-wp/trunk/includes/class-pdf-generator-for-wp.php

    r3728108 r3807205  
    7878                } else {
    7979
    80                         $this->version = '1.6.5';
     80                        $this->version = '1.6.6';
    8181                }
    8282
  • pdf-generator-for-wp/trunk/languages/pdf-generator-for-wp-en_US.po

    r3728108 r3807205  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: PDF Generator For WP 1.6.5\n"
    4 "POT-Creation-Date: 2026-10-01 12:26+0530\n"
    5 "PO-Revision-Date: 2026-10-01 12:27+0530\n"
     3"Project-Id-Version: PDF Generator For WP 1.6.6\n"
     4"POT-Creation-Date: 2026-11-17 15:49+0530\n"
     5"PO-Revision-Date: 2026-11-17 15:49+0530\n"
    66"Last-Translator: \n"
    77"Language-Team: \n"
    … …  
    34573457msgstr ""
    34583458
     3459#: common/class-pdf-generator-for-wp-common.php:104
     3460msgid "You are not allowed to access this document."
     3461msgstr ""
     3462
    34593463#: common/class-pdf-generator-for-wp-common.php:141
    34603464msgid "Please Enter Valid Email Address to Receive Attachment."
  • pdf-generator-for-wp/trunk/languages/pdf-generator-for-wp.pot

    r3728108 r3807205  
    22msgid ""
    33msgstr ""
    4 "Project-Id-Version: PDF Generator For WP 1.6.5\n"
    5 "POT-Creation-Date: 2026-10-01 12:26+0530\n"
     4"Project-Id-Version: PDF Generator For WP 1.6.6\n"
     5"POT-Creation-Date: 2026-11-17 15:49+0530\n"
    66"PO-Revision-Date: 2023-10-03 16:14+0530\n"
    77"Last-Translator: \n"
    … …  
    34623462msgstr ""
    34633463
     3464#: common/class-pdf-generator-for-wp-common.php:104
     3465msgid "You are not allowed to access this document."
     3466msgstr ""
     3467
    34643468#: common/class-pdf-generator-for-wp-common.php:141
    34653469msgid "Please Enter Valid Email Address to Receive Attachment."
  • pdf-generator-for-wp/trunk/pdf-generator-for-wp.php

    r3728108 r3807205  
    1616 * Plugin URI:        https://wordpress.org/plugins/pdf-generator-for-wp/
    1717 * Description:       <code><strong>PDF Generator for WordPress</strong></code> plugin allows to generate and download PDF files from WordPress sites across multiple platforms in just one click. Elevate your eCommerce store by exploring more on WP Swings.<a href="https://wpswings.com/woocommerce-plugins/?utm_source=wpswings-pdf-shop&utm_medium=pdf-org-backend&utm_campaign=shop-page" target="_blank"> Elevate your e-commerce store by exploring more on <strong> WP Swings </strong></a>
    18  * Version:           1.6.5
     18 * Version:           1.6.6
    1919 * Author:            WP Swings
    2020 * Author URI:        https://wpswings.com/?utm_source=wpswings-official&utm_medium=pdf-org-backend&utm_campaign=official
    … …  
    2323 *
    2424 * Requires at least:    6.7.0
    25  * Tested up to:         7.1.2
     25 * Tested up to:         7.1.4
    2626 * WC requires at least: 6.5.0
    27  * WC tested up to:      11.1.2
    28  * Stable tag:           1.6.5
     27 * WC tested up to:      11.3.0
     28 * Stable tag:           1.6.6
    2929 * Requires PHP:         7.4
    3030 *
    … …  
    6363 */
    6464function define_pdf_generator_for_wp_constants() {
    65         pdf_generator_for_wp_constants( 'PDF_GENERATOR_FOR_WP_VERSION', '1.6.5' );
     65        pdf_generator_for_wp_constants( 'PDF_GENERATOR_FOR_WP_VERSION', '1.6.6' );
    6666        pdf_generator_for_wp_constants( 'PDF_GENERATOR_FOR_WP_DIR_PATH', plugin_dir_path( __FILE__ ) );
    6767        pdf_generator_for_wp_constants( 'PDF_GENERATOR_FOR_WP_DIR_URL', plugin_dir_url( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.