Skip to content

Commit

Permalink
properly sanitizing the random form ID. props to @swissspidy for the …
Browse files Browse the repository at this point in the history
…idea
  • Loading branch information
tyxla committed Dec 28, 2015
1 parent 0e138f9 commit 326d3b7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gravity Forms: Multiple Form Instances
=====================================

### Version 1.0.11
### Version 1.0.12

-----

Expand Down
4 changes: 2 additions & 2 deletions gravityforms-multiple-form-instances.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
}
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.

Expand Down

0 comments on commit 326d3b7

Please sign in to comment.