diff --git a/README.md b/README.md index 0f727c0..834faab 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Gravity Forms: Multiple Form Instances ===================================== -### Version 1.0.11 +### Version 1.0.12 ----- diff --git a/gravityforms-multiple-form-instances.php b/gravityforms-multiple-form-instances.php index bfd4a53..a0449de 100644 --- a/gravityforms-multiple-form-instances.php +++ b/gravityforms-multiple-form-instances.php @@ -5,7 +5,7 @@ * Author: tyxla * Author URI: http://marinatanasov.com/ * Plugin URI: https://github.com/tyxla/Gravity-Forms-Multiple-Form-Instances - * Version: 1.0.11 + * Version: 1.0.12 * License: GPL2 * Requires at least: 3.0.1 * Tested up to: 4.4 @@ -42,7 +42,7 @@ function __construct() { function gform_get_form_filter($form_string, $form) { // if form has been submitted, use the submitted ID, otherwise generate a new unique ID if (isset($_POST['gform_random_id'])) { - $random_id = $_POST['gform_random_id']; + $random_id = absint( $_POST['gform_random_id'] ); } else { $random_id = mt_rand(); } diff --git a/readme.txt b/readme.txt index 7edd3c2..be6f198 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: tyxla Tags: gravity, form, multiple, gravity forms Requires at least: 3.0.1 Tested up to: 4.4 -Stable tag: 1.0.11 +Stable tag: 1.0.12 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -25,6 +25,9 @@ This plugin addresses this issue, allowing multiple forms to be displayed on the == Changelog == += 1.0.12 = +Properly sanitizing the random form ID. Props @swissspidy. + = 1.0.11 = Tested with WordPress 4.4.