Permalink
Browse files

Adds a security for int values in MLDatabaseItem library.

  • Loading branch information...
JB Lebrun
JB Lebrun committed Mar 14, 2018
1 parent ff38573 commit 549b590d5323cd7138b2bb5657664a9b2d8b917a
Showing with 2 additions and 2 deletions.
  1. +2 −2 engine/lib/object/MLDatabaseItem.php.inc
@@ -150,13 +150,13 @@ class MLDatabaseItem extends ModuleLibraryItem {
switch ($this->datatype) {
case 'int':
case 'date':
return ''.$this->value;
return ''.(int)$this->value;
case 'float':
return preg_replace('/,/', '.', (string)$this->value);
case 'text':
return '"'.addslashes($this->value).'"';
case 'etext':
return '"'.$camyks->encode_value( $this->value ). '"';
return '"'.$camyks->encode_value($this->value). '"';
case 'password':
return '"'.$this->value.'"';
case 'list':

0 comments on commit 549b590

Please sign in to comment.