Avoid sql injection on edge cases

This commit is contained in:
Tobias Reich 2014-01-24 16:53:22 +01:00
parent d5ec17aa70
commit dd0171c726

View File

@ -25,6 +25,9 @@ function dbConnect() {
if (!$database->query("SELECT * FROM lychee_photos, lychee_albums, lychee_settings;")) if (!$database->query("SELECT * FROM lychee_photos, lychee_albums, lychee_settings;"))
if (!createTables($database)) exit('Error: Could not create tables!'); if (!createTables($database)) exit('Error: Could not create tables!');
// Avoid sql injection
$database->set_charset('GBK');
return $database; return $database;
} }