Avoid sql injection on edge cases
This commit is contained in:
parent
d5ec17aa70
commit
dd0171c726
@ -25,6 +25,9 @@ function dbConnect() {
|
||||
if (!$database->query("SELECT * FROM lychee_photos, lychee_albums, lychee_settings;"))
|
||||
if (!createTables($database)) exit('Error: Could not create tables!');
|
||||
|
||||
// Avoid sql injection
|
||||
$database->set_charset('GBK');
|
||||
|
||||
return $database;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user