Open dregad opened 10 years ago
It's worth mentioning that simply replacing the function call is not sufficient; to avoid risk of sql injection attacks, any inline query parameters should be replaced by calls to db_param(). For example:
$t_query = "SELECT * FROM $table WHERE id = '$p_id'";
db_query($t_query);
Would become
$t_query = "SELECT * FROM $table WHERE id = '" . db_param() . "'";
db_query_bound($t_query, array( $p_id ) );
In MantisBT 1.3, the
db_query()
function will be removed from the API (see mantisbt/mantisbt#128). The following occurences have been found in this plugin; they should be replaced bydb_query_bound()
calls