77 |
|
|
78 |
// Récupération des infos utilisateur |
// Récupération des infos utilisateur |
79 |
$sqlUser = "SELECT om_utilisateur, nom, email, login, om_collectivite, om_profil ". |
$sqlUser = "SELECT om_utilisateur, nom, email, login, om_collectivite, om_profil ". |
80 |
"FROM ".DB_PREFIXE."om_utilisateur WHERE login = '".$_SESSION['login']."'"; |
"FROM ".DB_PREFIXE."om_utilisateur WHERE login = '".$this->clean_break($_SESSION['login'])."'"; |
81 |
$resUser=$this->db->query($sqlUser); |
$resUser=$this->db->query($sqlUser); |
82 |
$this->addToLog("getUserInfos(): db->query(\"".$sqlUser."\");", VERBOSE_MODE); |
$this->addToLog("getUserInfos(): db->query(\"".$sqlUser."\");", VERBOSE_MODE); |
83 |
if ( database::isError($resUser)){ |
if ( database::isError($resUser)){ |
1096 |
// |
// |
1097 |
return false; |
return false; |
1098 |
} |
} |
1099 |
|
|
1100 |
|
function clean_break($input) { |
1101 |
|
//remove whitespace... |
1102 |
|
$input = trim($input); |
1103 |
|
//disable magic quotes... |
1104 |
|
$input = get_magic_quotes_gpc() ? stripslashes($input) : $input; |
1105 |
|
//prevent sql injection... |
1106 |
|
$input = is_numeric($input) ? intval($input) : $this->db->escapeSimple($input); |
1107 |
|
//prevent xss... |
1108 |
|
$input = htmlentities($input); |
1109 |
|
return $input; |
1110 |
|
} |
1111 |
} |
} |
1112 |
|
|
1113 |
?> |
?> |