mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
DB and protection (#6696)
so this small change has 2 purposes. first, I found the hard way, that PHP PDO is not always coded with the same criteria between versions and databases. While PDO PGSQL on PHP 8.x may work, PDO SQLITE on PHP 7.4 may not and so on.. This will make sure that the value there is an integer. Second, since these two values are taken from the _GET, which is in the URL string, it will protect against "imaginative" users.
This commit is contained in:
committed by
GitHub
parent
ab29d70f40
commit
3f544496b7
@@ -591,8 +591,8 @@
|
||||
}
|
||||
else {
|
||||
$sql .= " limit :limit offset :offset \n";
|
||||
$parameters['limit'] = $rows_per_page;
|
||||
$parameters['offset'] = $offset;
|
||||
$parameters['limit'] = intval($rows_per_page);
|
||||
$parameters['offset'] = intval($offset);
|
||||
}
|
||||
}
|
||||
$sql = str_replace(" ", " ", $sql);
|
||||
|
||||
Reference in New Issue
Block a user