mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
Merge branch 'ent-8437-SQL-Injection-en-API' into 'develop'
sanitize sql inputs See merge request artica/pandorafms!4629
This commit is contained in:
commit
6edc6c6d40
@ -16590,7 +16590,11 @@ function api_get_user_info($thrash1, $thrash2, $other, $returnType)
|
|||||||
|
|
||||||
$other = json_decode(base64_decode($other['data']), true);
|
$other = json_decode(base64_decode($other['data']), true);
|
||||||
|
|
||||||
$sql = 'select * from tusuario where id_user = "'.$other[0]['id_user'].'" and password = "'.$other[0]['password'].'"';
|
$sql = sprintf(
|
||||||
|
'SELECT * FROM tusuario WHERE id_user = "%s" and password = "%s"',
|
||||||
|
mysql_escape_string_sql($other[0]['id_user']),
|
||||||
|
mysql_escape_string_sql($other[0]['password'])
|
||||||
|
);
|
||||||
|
|
||||||
$user_info = db_get_all_rows_sql($sql);
|
$user_info = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user