mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #345 from frankmullenger/frankmullenger-sql-patch
FIX: Casting to integer to prevent potential SQL injection.
This commit is contained in:
commit
606b20bf72
@ -152,7 +152,7 @@ class UserDefinedForm extends Page {
|
||||
);
|
||||
|
||||
// make sure a numeric not a empty string is checked against this int column for SQL server
|
||||
$parentID = (!empty($self->ID)) ? $self->ID : 0;
|
||||
$parentID = (!empty($self->ID)) ? (int)$self->ID : 0;
|
||||
|
||||
// get a list of all field names and values used for print and export CSV views of the GridField below.
|
||||
$columnSQL = <<<SQL
|
||||
|
Loading…
Reference in New Issue
Block a user