Skip to content

Commit

Permalink
Fix SQL injection escape DB identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisjacquet committed Apr 25, 2022
1 parent 3c561a6 commit 15d5e87
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -53,6 +53,7 @@ Changes in 9.0
- Add AttrEscape() function in Inputs.php
- Use AttrEscape() instead of htmlspecialchars(), program wide
- Maintain Advanced search when editing Timeframe in Percent.php
- Fix SQL injection escape DB identifier in RegistrationSave.fnc.php, Calendar.php, MarkingPeriods.php, SchoolFields.php, AddressFields.php, PeopleFields.php, StudentFields.php & UserFields.php

Changes in 8.9.4
----------------
Expand Down
2 changes: 1 addition & 1 deletion modules/Custom/includes/RegistrationSave.fnc.php
Expand Up @@ -407,7 +407,7 @@ function RegistrationSaveContactNameFields( $config, $values )
if ( ! empty( $value )
|| $value == '0' )
{
$fields .= $column . ',';
$fields .= DBEscapeIdentifier( $column ) . ',';

$values_sql .= "'" . $value . "',";
}
Expand Down
2 changes: 1 addition & 1 deletion modules/School_Setup/Calendar.php
Expand Up @@ -500,7 +500,7 @@
if ( ! empty( $value )
|| $value == '0' )
{
$fields .= $column . ',';
$fields .= DBEscapeIdentifier( $column ) . ',';
$values .= "'" . $value . "',";
$go = true;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/School_Setup/MarkingPeriods.php
Expand Up @@ -204,7 +204,7 @@
if ( ! empty( $value )
|| $value === '0' )
{
$fields .= $column . ',';
$fields .= DBEscapeIdentifier( $column ) . ',';

$values .= "'" . $value . "',";

Expand Down
2 changes: 1 addition & 1 deletion modules/School_Setup/SchoolFields.php
Expand Up @@ -73,7 +73,7 @@
if ( ! empty( $value )
|| $value == '0' )
{
$fields .= $column . ',';
$fields .= DBEscapeIdentifier( $column ) . ',';

$values .= "'" . $value . "',";

Expand Down
2 changes: 1 addition & 1 deletion modules/Students/includes/AddressFields.php
Expand Up @@ -91,7 +91,7 @@
if ( ! empty( $value )
|| $value == '0' )
{
$fields .= $column . ',';
$fields .= DBEscapeIdentifier( $column ) . ',';

$values .= "'" . $value . "',";

Expand Down
2 changes: 1 addition & 1 deletion modules/Students/includes/PeopleFields.php
Expand Up @@ -91,7 +91,7 @@
if ( ! empty( $value )
|| $value == '0' )
{
$fields .= $column . ',';
$fields .= DBEscapeIdentifier( $column ) . ',';

$values .= "'" . $value . "',";

Expand Down
2 changes: 1 addition & 1 deletion modules/Students/includes/StudentFields.php
Expand Up @@ -125,7 +125,7 @@
if ( ! empty( $value )
|| $value == '0' )
{
$fields .= $column . ',';
$fields .= DBEscapeIdentifier( $column ) . ',';

$values .= "'" . $value . "',";

Expand Down
2 changes: 1 addition & 1 deletion modules/Users/UserFields.php
Expand Up @@ -134,7 +134,7 @@
if ( ! empty( $value )
|| $value == '0' )
{
$fields .= $column . ',';
$fields .= DBEscapeIdentifier( $column ) . ',';

$values .= "'" . $value . "',";

Expand Down

0 comments on commit 15d5e87

Please sign in to comment.