* Fix sql injection when importing jira.

close GH-106
This commit is contained in:
Lufei
2022-12-14 09:37:00 +08:00
parent 6f584ec3c1
commit 447db0a97a
+4 -3
View File
@@ -41,12 +41,13 @@ class convertModel extends model
* Check database exits or not.
*
* @access public
* @return bool
* @return object|false
*/
public function dbExists($dbName = '')
{
$sql = "SHOW DATABASES like '{$dbName}'";
return $this->dbh->query($sql)->fetch();
$statement = $this->dbh->prepare('SHOW DATABASES like ?');
$statement->execute([$dbName]);
return $statement->fetch();
}
/**