Important Security Fixes in Gravity PDF 6.18

This update includes a number of important security fixes, and it’s recommended you update all sites to Gravity PDF 6.18.0 without delay.

You can download the download the latest version on GravityPDF.com. Or update by visiting your WordPress Dashboard, click “Updates”, select “Gravity PDF” from the Plugins list and click “Update Plugins”. If a new version isn’t listed, try the “Check again.” link.

Security Updates

The following security fixes are included in this release:
  • Fix a Broken Access Control vulnerability responsibly disclosed to us by Peter Tang (CVSS 5.3)
  • Restrict PDF Template upload and delete actions to users that can both manage Gravity Forms settings and install plugins
  • Disable PDF Template upload and delete actions when a site sets DISALLOW_FILE_MODS
  • Update the library handling PDF Template and font uploads
  • Fix regression where shortcodes and merge tags in submitted field values were processed in PDFs
  • Only create signed PDF URLs when the shortcode or merge tag is from a trusted source
  • Cap the maximum for Logged Out Timeout to 1 week and the signed PDF URLs to 1 year
  • Escape the full $form_data output when displayed in debug mode
  • Redact user records in log files
  • Harden the Core Font Installer

Other Changes

The Template Manager now accepts multiple zip files uploaded together and you can drop the files anywhere on the screen to install. You can use File Upload fields in the PDF Conditional Logic setting. The release also includes 37 bug fixes and 13 housekeeping changes.

Features

  • Install several PDF template zips at once
  • Drop template zips anywhere in the Template Manager
  • Install template zips that have the templates inside a folder
  • Use File Upload fields in PDF conditional logic, including fields

Housekeeping

  • Stop checking for the existence of Gravity PDF folders on every page load
  • Create the background processing queue once per request
  • Only flush a font from the cache when it’s added, edited or deleted
  • Make the folder permission error dismissible (for a week)
  • Check Gravity PDF folder permissions on the System Status report page
  • Set a 1-minute minimum for the Logged Out Timeout
  • Raise the PDF template upload limit to 32MB, or the server’s limit if lower
  • Link to the custom template docs from the Template Manager
  • Explain in the Template Manager why an admin can’t upload or delete templates
  • Scope the bundled PSR-Log library and only load it globally for older add-ons that need it
  • Speed up long PDFs built from rows of floated elements
  • Update PHP and JavaScript dependencies
  • Remove the redux-devtools-extension package

Bug Fixes

  • Correctly display single File Upload field entries saved on Gravity Forms 2.10+
  • Fix a filesystem race condition and permission checks on network storage that could prevent PDFs being generated or show a false permissions notice
  • Fix an edge case where a failed global settings save would reset all global PDF settings
  • Fix regression where a failed global settings save discarded the entered values
  • Only show a failed global settings save’s values to the user who made it
  • Fix the global settings save silently failing because of another plugin’s error or an extension’s notice
  • Show an extension’s warning on a settings save as a warning
  • Only clear the background PDF queue once a change to Background Processing is saved
  • Use the default when a number setting is left blank
  • Hide the Tools tab from users who can’t use it
  • Switch back to the current user when checking another user’s PDF capabilities fails
  • Fix missing slash when converting a path under the site root to a URL
  • Keep PDF merge tags in an administrative field’s Default Value when the entry is saved
  • Fix a [gravitypdf] shortcode in a rich text administrative field’s Default Value showing as text in the PDF
  • Refuse to install Developer Toolkit templates in the Template Manager until the Toolkit plugin is active
  • Prevent the Template Manager deleting add-on PDF templates
  • Let the Template Manager delete PDF templates on Windows servers
  • Explain why a PDF template upload was refused when the file isn’t a zip or is too large
  • Fix PHP deprecation notices when a field value or PDF setting is empty
  • Fix PHP deprecation notice for empty rich text Paragraph fields
  • Don’t add debug errors to raw PDF URLs
  • Delete PDFs sent with Gravity Forms background notifications
  • Keep the installed core font when a download fails, instead of replacing it with a broken font file
  • Stop different entries sharing a temporary PDF folder
  • Stop admin notices jumping down the page on Gravity Forms pages
  • Keep the cleanup to mPDF’s own files when the gfpdf_mpdf_tmp_location filter is used
  • Fix custom font uploads when the filename has dots or brackets
  • Clean up the font files a failed custom font save leaves behind
  • Show the correct upload limit when a custom font file is too large
  • Clear the Font Manager’s malformed font error once the bad font file is replaced or removed
  • Stop the code inside <script> elements showing as text in the PDF
  • Don’t leave PDF generation filters attached when a PDF fails to generate
  • Stop bypassing Populate Anything’s live merge tag whitelist after a PDF is generated
  • Stop PDFs crashing on Gravity Forms before 2.8.2 when a field leaves a gap in its row
  • Stop the next field moving into the gap a field leaves at the end of its row
  • Use the form’s description placement for Consent fields set to “Use Form Setting”
  • Show every accepted agreement for Gravity Wiz Terms of Service fields with more than one checkbox

Developers

If you’ve customized Gravity PDF the following changes apply:
  • Add GPDFAPI::get_pdf_url() to get the URL to an entry’s PDF, optionally signed
  • Submitted $form_data values with [ ] { } now get U+FEFF after each [, { and :, except HTML/Section fields and administrative defaults
  • A gfpdf_get_option_logged_out_timeout filter returning 0 now expires IP-based logged-out access immediately, instead of turning off the Logged Out Timeout
  • The default gfpdf_mpdf_tmp_location is now the PDF tmp folder, which moves mPDF’s cache from tmp/mpdf/mpdf to tmp/mpdf
  • Folders added with the gfpdf_installer_create_folders filter are now created on install, upgrade and the twice-daily cleanup, not every request
  • Fix the gfpdf_settings_sanitize filter result being discarded when saving the global settings
  • Add a sanitize_callback option to global settings fields
  • Pass the form, entry and PDF config to the gfpdf_field_container_class filter for Repeater and Nested Form fields
  • Add gfpdf_signed_url_max_expiration filter to change the 1-year cap on signed PDF URLs
  • Add gfpdf_process_merge_tags_in_submitted_rich_text filter to toggle merge tags in submitted rich-text Textarea and Post Content values. Off for new installs.
  • Add gfpdf_shortcode_signing_user_id filter to change which user’s entry access is checked when signing [gravitypdf] URLs
  • Add the gfpdf_template_max_upload_size filter
  • Add gfpdf_alias_global_psr_log filter to load the bundled PSR-Log library into the global Psr\Log namespace
Stay on top!
Never miss out on the latest news and updates in Gravity PDF land. Subscribe to our newsletter now!