patch #455752 - Check forbidden words thanks to Dell'Aiera Pol & Olivier Blin

This commit is contained in:
Loïc Chapeaux
2001-08-31 21:00:00 +00:00
parent 634b370c36
commit dc4e4bbae8
2 changed files with 14 additions and 2 deletions

View File

@@ -13,8 +13,15 @@ require('./lib.inc.php3');
* A new name has been submitted -> do the work
*/
if (isset($new_name) && trim($new_name) != '') {
$old_name = $table;
$table = $new_name;
$old_name = $table;
$table = $new_name;
if (get_magic_quotes_gpc()) {
$new_name = stripslashes($new_name);
}
if (MYSQL_INT_VERSION < 32306) {
check_reserved_words($new_name);
}
include('./header.inc.php3');
mysql_select_db($db);
$local_query = 'ALTER TABLE ' . backquote($old_name) . ' RENAME ' . backquote($new_name);