You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: When searching for a publisher in the Publisher table, the publisher name search string that includes quotes has the quotes replaced twice in the SQL query—once in uploadComplete.php and once in Publisher.php.
public function getByName($publisherName){
$query = "select publisherID from Publisher where upper(name) = upper('" . str_replace("'","''", $publisherName) . "') LIMIT 1;";
Issue: This double replacement of quotes causes publisher names that include quotes to never match an existing entry in the Publisher table, resulting in duplicate rows being created.
Suggested Solution: Remove one of the str_replace calls. Additionally, consider using prepared statements to avoid these replacements and improve security.
The text was updated successfully, but these errors were encountered:
Description: When searching for a publisher in the Publisher table, the publisher name search string that includes quotes has the quotes replaced twice in the SQL query—once in uploadComplete.php and once in Publisher.php.
Details:
uploadComplete.php
:Publisher.php
:Issue: This double replacement of quotes causes publisher names that include quotes to never match an existing entry in the Publisher table, resulting in duplicate rows being created.
Suggested Solution: Remove one of the
str_replace
calls. Additionally, consider using prepared statements to avoid these replacements and improve security.The text was updated successfully, but these errors were encountered: