diff --git a/classes/install.class.php b/classes/install.class.php index 3bd713a..d838882 100644 --- a/classes/install.class.php +++ b/classes/install.class.php @@ -120,14 +120,13 @@ class Install { PRIMARY KEY (`id_feed`) ) ENGINE=MyISAM ;"; - - $sqlStr[] = "INSERT INTO `".Table_prefix."config` VALUES (". $this->data['posts_limit'] .", '".$this->data['title']."', '".$this->data['description']."', '".$this->data['lang']."', '".$this->data['template']."', '".$this->data['url_installation']."');"; - $sqlStr[] = "INSERT INTO `".Table_prefix."users` VALUES ('', '', '".$this->data['login']."', '".md5($this->data['password'])."', '".$this->data['email']."', '".$this->data['website']."', '".$this->data['about']."');"; + $sqlStr[] = "INSERT INTO `".Table_prefix."config` VALUES (". $db->sql_escape($this->data['posts_limit']).", '".$db->sql_escape($this->data['title'])."', '".$db->sql_escape($this->data['description'])."', '".$db->sql_escape($this->data['lang'])."', '".$db->sql_escape($this->data['template'])."', '".$db->sql_escape($this->data['url_installation'])."');"; + $sqlStr[] = "INSERT INTO `".Table_prefix."users` VALUES ('', '', '".$db->sql_escape($this->data['login'])."', '".md5($this->data['password'])."', '".$db->sql_escape($this->data['email'])."', '".$db->sql_escape($this->data['website'])."', '".$db->sql_escape($this->data['about'])."');"; $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('url_friendly', '0');"; $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('rich_text', '0');"; $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('allow_comments', '0');"; - $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('offset_city', '".$this->data['offset_city']."');"; - $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('offset_time', '".$this->data['offset_time']."');"; + $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('offset_city', '".$db->sql_escape($this->data['offset_city'])."');"; + $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('offset_time', '".$db->sql_escape($this->data['offset_time'])."');"; $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('shorten_links', '0');"; $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('rss_import_frec', '5 minutes');"; $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('check_version', '1');"; diff --git a/install.php b/install.php index 041962b..1d06045 100644 --- a/install.php +++ b/install.php @@ -63,7 +63,7 @@ $install->check_form(); Database Settings