我今天早上遭到攻击,并在我的网站中注入了一些 JS。我正试图找到这个洞并修补它。我的印象是下面的 PDO 是安全的,有人可以确认或否认这一点吗?
//Adding the lead to the local database
$leads = array($firstName, $lastName, $company, $state, $country, $phone, $email, $industry, $uniqueId, $comments );
$qry = $dbh->prepare(
'INSERT INTO leads (FirstName, LastName, Company, State, Country, Phone, Email, Industry, Solution, Comments) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
if(!($qry->execute($leads))) {
print_r($dbh->errorInfo());
}