mirror of
https://github.com/dg/dibi.git
synced 2025-08-12 17:14:16 +02:00
fixed sql injection vulnerability through conditions and comments [closes #30]
This commit is contained in:
committed by
David Grudl
parent
af6352d0af
commit
af715a8044
@@ -182,6 +182,10 @@ final class DibiTranslator extends DibiObject
|
|||||||
*/
|
*/
|
||||||
public function formatValue($value, $modifier)
|
public function formatValue($value, $modifier)
|
||||||
{
|
{
|
||||||
|
if ($this->comment) {
|
||||||
|
return "...";
|
||||||
|
}
|
||||||
|
|
||||||
// array processing (with or without modifier)
|
// array processing (with or without modifier)
|
||||||
if ($value instanceof Traversable) {
|
if ($value instanceof Traversable) {
|
||||||
$value = iterator_to_array($value);
|
$value = iterator_to_array($value);
|
||||||
|
Reference in New Issue
Block a user