Skip to content

Commit

Permalink
correction to csrf_protection on validation helper
Browse files Browse the repository at this point in the history
  • Loading branch information
trongate committed Jan 23, 2023
1 parent f8cb115 commit 423791f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion engine/license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* An open source PHP framework for web developers who like to break the rules
*
* Version: 1.3.3042
* Version: 1.3.3043
*
* This product is released under the MIT License (MIT)
*
Expand Down
4 changes: 2 additions & 2 deletions engine/tg_helpers/validation_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class Validation_helper {

public function set_rules($key, $label, $rules) {

$this->csrf_protect();

if ((!isset($_POST[$key])) && (isset($_FILES[$key]))) {

if (!isset($_POST[$key])) {
Expand Down Expand Up @@ -89,6 +87,8 @@ private function run_validation_test($validation_data, $rules=null) {

public function run($validation_array=null) {

$this->csrf_protect();

if (isset($_SESSION['form_submission_errors'])) {
unset($_SESSION['form_submission_errors']);
}
Expand Down
2 changes: 1 addition & 1 deletion license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* An open source PHP framework for web developers who like to break the rules
*
* Version: 1.3.3042
* Version: 1.3.3043
*
* This product is released under the MIT License (MIT)
*
Expand Down

0 comments on commit 423791f

Please sign in to comment.