Permalink
Browse files

Import Open Blog 1.2.1

  • Loading branch information...
Kami committed Oct 10, 2010
1 parent 6ee162b commit f4525968c241d8651d8b942cd2be0d723d5603ad
@@ -8,7 +8,7 @@
|
*/
-$config['version'] = '1.2.0';
+$config['version'] = '1.2.1';
$config['author'] = 'Tomaž Muraus';
$config['author_email'] = 'kami@open-blog.info';
$config['version_check_url'] = 'http://update.open-blog.info/';
@@ -32,8 +32,8 @@ public function index()
public function create()
{
- $this->form_validation->set_rules('name', 'lang:form_category_name', 'required|max_length[60]');
- $this->form_validation->set_rules('description', 'lang:form_category_description', 'required|max_length[200]');
+ $this->form_validation->set_rules('name', 'lang:form_category_name', 'required|max_length[60]|xss_clean');
+ $this->form_validation->set_rules('description', 'lang:form_category_description', 'required|max_length[200]|xss_clean');
$this->form_validation->set_error_delimiters('', '<br />');
@@ -57,8 +57,8 @@ public function edit($id = null)
$id = $this->input->post('id');
}
- $this->form_validation->set_rules('name', 'lang:form_category_name', 'required|max_length[60]');
- $this->form_validation->set_rules('description', 'lang:form_category_description', 'required|max_length[200]');
+ $this->form_validation->set_rules('name', 'lang:form_category_name', 'required|max_length[60]|xss_clean');
+ $this->form_validation->set_rules('description', 'lang:form_category_description', 'required|max_length[200]|xss_clean');
$this->form_validation->set_error_delimiters('', '<br />');
@@ -52,7 +52,7 @@ public function edit($id = null)
$id = $this->input->post('id');
}
- $this->form_validation->set_rules('comment', 'lang:form_comment', 'required');
+ $this->form_validation->set_rules('comment', 'lang:form_comment', 'required|xss_clean');
$this->form_validation->set_error_delimiters('', '<br />');
@@ -32,11 +32,11 @@ public function index()
public function create()
{
- $this->form_validation->set_rules('name', 'lang:form_name', 'required|max_length[50]');
- $this->form_validation->set_rules('url', 'lang:form_url', 'required');
- $this->form_validation->set_rules('target', 'lang:form_target', 'required');
- $this->form_validation->set_rules('description', 'lang:form_description', 'required|max_length[100]');
- $this->form_validation->set_rules('visible', 'lang:form_visible', 'required');
+ $this->form_validation->set_rules('name', 'lang:form_name', 'required|max_length[50]|xss_clean');
+ $this->form_validation->set_rules('url', 'lang:form_url', 'required|xss_clean');
+ $this->form_validation->set_rules('target', 'lang:form_target', 'required|xss_clean');
+ $this->form_validation->set_rules('description', 'lang:form_description', 'required|max_length[100]|xss_clean');
+ $this->form_validation->set_rules('visible', 'lang:form_visible', 'required|xss_clean');
$this->form_validation->set_error_delimiters('', '<br />');
@@ -60,11 +60,11 @@ public function edit($id = null)
$id = $this->input->post('id');
}
- $this->form_validation->set_rules('name', 'lang:form_name', 'required|max_length[50]');
- $this->form_validation->set_rules('url', 'lang:form_url', 'required');
- $this->form_validation->set_rules('target', 'lang:form_target', 'required');
- $this->form_validation->set_rules('description', 'lang:form_description', 'required|max_length[100]');
- $this->form_validation->set_rules('visible', 'lang:form_visible', 'required');
+ $this->form_validation->set_rules('name', 'lang:form_name', 'required|max_length[50]|xss_clean');
+ $this->form_validation->set_rules('url', 'lang:form_url', 'required|xss_clean');
+ $this->form_validation->set_rules('target', 'lang:form_target', 'required|xss_clean');
+ $this->form_validation->set_rules('description', 'lang:form_description', 'required|max_length[100]|xss_clean');
+ $this->form_validation->set_rules('visible', 'lang:form_visible', 'required|xss_clean');
$this->form_validation->set_error_delimiters('', '<br />');
@@ -48,9 +48,9 @@ public function move_navigation_item()
public function create()
{
- $this->form_validation->set_rules('title', 'lang:form_title', 'required|max_length[50]');
- $this->form_validation->set_rules('url', 'lang:form_url', 'required');
- $this->form_validation->set_rules('description', 'lang:form_description', 'required|max_length[100]');
+ $this->form_validation->set_rules('title', 'lang:form_title', 'required|max_length[50]|xss_clean');
+ $this->form_validation->set_rules('url', 'lang:form_url', 'required|xss_clean');
+ $this->form_validation->set_rules('description', 'lang:form_description', 'required|max_length[100]|xss_clean');
$this->form_validation->set_error_delimiters('', '<br />');
@@ -74,9 +74,9 @@ public function edit($id = null)
$id = $this->input->post('id');
}
- $this->form_validation->set_rules('title', 'lang:form_title', 'required|max_length[50]');
- $this->form_validation->set_rules('url', 'lang:form_url', 'required');
- $this->form_validation->set_rules('description', 'lang:form_description', 'required|max_length[100]');
+ $this->form_validation->set_rules('title', 'lang:form_title', 'required|max_length[50]|xss_clean');
+ $this->form_validation->set_rules('url', 'lang:form_url', 'required|xss_clean');
+ $this->form_validation->set_rules('description', 'lang:form_description', 'required|max_length[100]|xss_clean');
$this->form_validation->set_error_delimiters('', '<br />');
@@ -33,9 +33,9 @@ public function index()
public function create()
{
- $this->form_validation->set_rules('title', 'lang:form_title', 'required|max_length[200]');
- $this->form_validation->set_rules('content', 'lang:form_content', 'required');
- $this->form_validation->set_rules('status', 'lang:form_status', 'required');
+ $this->form_validation->set_rules('title', 'lang:form_title', 'required|max_length[200]|xss_clean');
+ $this->form_validation->set_rules('content', 'lang:form_content', 'required|prep_for_form');
+ $this->form_validation->set_rules('status', 'lang:form_status', 'required|xss_clean');
$this->form_validation->set_error_delimiters('', '<br />');
@@ -67,9 +67,9 @@ public function edit($id = null)
$id = $this->input->post('id');
}
- $this->form_validation->set_rules('title', 'lang:form_title', 'required|max_length[200]');
- $this->form_validation->set_rules('content', 'lang:form_content', 'required');
- $this->form_validation->set_rules('status', 'lang:form_status', 'required');
+ $this->form_validation->set_rules('title', 'lang:form_title', 'required|max_length[200]|xss_clean');
+ $this->form_validation->set_rules('content', 'lang:form_content', 'required|prep_for_form');
+ $this->form_validation->set_rules('status', 'lang:form_status', 'required|xss_clean');
$this->form_validation->set_error_delimiters('', '<br />');
@@ -33,14 +33,14 @@ public function index()
public function create()
{
- $this->form_validation->set_rules('title', 'lang:form_title', 'required|max_length[200]');
- $this->form_validation->set_rules('excerpt', 'lang:form_excerpt', 'required');
- $this->form_validation->set_rules('content', 'lang:form_content', '');
+ $this->form_validation->set_rules('title', 'lang:form_title', 'required|max_length[200]|xss_clean');
+ $this->form_validation->set_rules('excerpt', 'lang:form_excerpt', 'required|prep_for_form');
+ $this->form_validation->set_rules('content', 'lang:form_content', 'prep_for_form');
$this->form_validation->set_rules('categories', 'lang:form_categories', 'required');
- $this->form_validation->set_rules('tags', 'lang:form_tags', '');
- $this->form_validation->set_rules('status', 'lang:form_status', 'required');
- $this->form_validation->set_rules('allow_comments', 'lang:form_allow_comments', '');
- $this->form_validation->set_rules('sticky', 'lang:form_sticky', '');
+ $this->form_validation->set_rules('tags', 'lang:form_tags', 'xss_clean');
+ $this->form_validation->set_rules('status', 'lang:form_status', 'required|xss_clean');
+ $this->form_validation->set_rules('allow_comments', 'lang:form_allow_comments', 'numeric');
+ $this->form_validation->set_rules('sticky', 'lang:form_sticky', 'numeric');
$this->form_validation->set_error_delimiters('', '<br />');
@@ -83,12 +83,13 @@ public function edit($id = null)
}
$this->form_validation->set_rules('title', 'lang:form_title', 'required|max_length[200]');
- $this->form_validation->set_rules('excerpt', 'lang:form_excerpt', 'required');
- $this->form_validation->set_rules('content', 'lang:form_content', '');
- $this->form_validation->set_rules('categories', 'lang:form_categories', 'required');
- $this->form_validation->set_rules('tags', 'lang:form_tags', '');
- $this->form_validation->set_rules('status', 'lang:form_status', 'required');
- $this->form_validation->set_rules('allow_comments', 'lang:form_allow_comments', '');
+ $this->form_validation->set_rules('excerpt', 'lang:form_excerpt', 'required|prep_for_form');
+ $this->form_validation->set_rules('content', 'lang:form_content', 'prep_for_form');
+ $this->form_validation->set_rules('categories', 'lang:form_categories', 'required|xss_clean');
+ $this->form_validation->set_rules('tags', 'lang:form_tags', 'xss_clean');
+ $this->form_validation->set_rules('status', 'lang:form_status', 'required|xss_clean');
+ $this->form_validation->set_rules('allow_comments', 'lang:form_allow_comments', 'numeric');
+ $this->form_validation->set_rules('sticky', 'lang:form_sticky', 'numeric');
$this->form_validation->set_error_delimiters('', '<br />');
@@ -23,9 +23,9 @@ public function index()
{
$this->load->module_model('admin', 'settings_model', 'settings');
- $this->form_validation->set_rules('blog_title', 'lang:form_blog_title', 'required');
- $this->form_validation->set_rules('blog_description', 'lang:form_blog_description', 'required');
- $this->form_validation->set_rules('meta_keywords', 'lang:form_meta_keywords', 'required');
+ $this->form_validation->set_rules('blog_title', 'lang:form_blog_title', 'required|xss_clean');
+ $this->form_validation->set_rules('blog_description', 'lang:form_blog_description', 'required|xss_clean');
+ $this->form_validation->set_rules('meta_keywords', 'lang:form_meta_keywords', 'required|xss_clean');
$this->form_validation->set_rules('admin_email', 'lang:form_admin_email', 'required|valid_email');
$this->form_validation->set_rules('allow_registrations', 'lang:form_allow_registrations', 'numeric');
$this->form_validation->set_rules('enable_captcha', 'lang:form_enable_captcha', 'numeric');
@@ -36,7 +36,7 @@ public function index()
$this->form_validation->set_rules('posts_per_page', 'lang:form_posts_per_page', 'required|numeric');
$this->form_validation->set_rules('links_per_box', 'lang:form_links_per_box', 'required|numeric');
$this->form_validation->set_rules('months_per_archive', 'lang:form_months_per_archive', 'required|numeric');
- $this->form_validation->set_rules('offline_reason', 'lang:form_offline_reason', '');
+ $this->form_validation->set_rules('offline_reason', 'lang:form_offline_reason', 'xss_clean');
if ($this->input->post('enabled') == 0)
{
@@ -36,13 +36,13 @@ public function edit($id = null)
$id = $this->input->post('id');
}
- $this->form_validation->set_rules('display_name', 'lang:form_display_name', 'max_length[50]');
+ $this->form_validation->set_rules('display_name', 'lang:form_display_name', 'max_length[50]|xss_clean');
$this->form_validation->set_rules('email', 'lang:form_email', 'required|valid_email');
- $this->form_validation->set_rules('level', 'lang:form_level', 'required');
- $this->form_validation->set_rules('website', 'lang:form_website', '');
- $this->form_validation->set_rules('msn_messenger', 'lang:form_msn_messenger', '');
- $this->form_validation->set_rules('jabber', 'lang:form_jabber', '');
- $this->form_validation->set_rules('about_me', 'lang:form_about_me', '');
+ $this->form_validation->set_rules('level', 'lang:form_level', 'required|xss_clean');
+ $this->form_validation->set_rules('website', 'lang:form_website', 'xss_clean');
+ $this->form_validation->set_rules('msn_messenger', 'lang:form_msn_messenger', 'xss_clean');
+ $this->form_validation->set_rules('jabber', 'lang:form_jabber', 'xss_clean');
+ $this->form_validation->set_rules('about_me', 'lang:form_about_me', 'xss_clean');
$this->form_validation->set_error_delimiters('', '<br />');
@@ -182,7 +182,7 @@ public function tags($tag_name = null)
public function search()
{
- $data['search_term'] = $this->input->post('term');
+ $data['search_term'] = $this->input->post('term', TRUE);
if ($data['search_term'] != "")
{
@@ -216,7 +216,7 @@ public function comment($id, $url)
if ($this->session->userdata('logged_in') == FALSE)
{
$this->form_validation->set_rules('nickname', 'lang:nickname', 'required|max_length[50]|xss_clean');
- $this->form_validation->set_rules('email', 'lang:email', 'required|valid_email|xss_clean');
+ $this->form_validation->set_rules('email', 'lang:email', 'required|valid_email');
if ($this->system_library->settings['enable_captcha'] == 1)
{
@@ -225,7 +225,7 @@ public function comment($id, $url)
}
$this->form_validation->set_rules('website', 'lang:website', 'xss_clean');
- $this->form_validation->set_rules('comment', 'lang:comment', 'required|max_length[400]|xss_clean');
+ $this->form_validation->set_rules('comment', 'lang:comment', 'required|max_length[400]|htmlentities');
$this->form_validation->set_error_delimiters('', '<br />');
@@ -26,15 +26,15 @@ public function register()
{
if ($this->system_library->settings['allow_registrations'] == 1)
{
- $this->form_validation->set_rules('username', 'lang:form_username', 'required|max_length[50]|callback_username_check');
- $this->form_validation->set_rules('display_name', 'lang:form_display_name', 'max_length[50]');
+ $this->form_validation->set_rules('username', 'lang:form_username', 'required|max_length[50]|callback_username_check|xss_clean');
+ $this->form_validation->set_rules('display_name', 'lang:form_display_name', 'max_length[50]|xss_clean');
$this->form_validation->set_rules('password', 'lang:form_password', 'required|matches[password_retype]');
$this->form_validation->set_rules('password_retype', 'lang:form_retype_password', 'required');
$this->form_validation->set_rules('email', 'lang:form_email', 'required|valid_email|callback_email_check');
- $this->form_validation->set_rules('website', 'lang:form_website', '');
- $this->form_validation->set_rules('msn_messenger', 'lang:form_msn_messenger', '');
- $this->form_validation->set_rules('jabber', 'lang:form_jabber', '');
- $this->form_validation->set_rules('about_me', 'lang:form_about_me', '');
+ $this->form_validation->set_rules('website', 'lang:form_website', 'xss_clean');
+ $this->form_validation->set_rules('msn_messenger', 'lang:form_msn_messenger', 'xss_clean');
+ $this->form_validation->set_rules('jabber', 'lang:form_jabber', 'xss_clean');
+ $this->form_validation->set_rules('about_me', 'lang:form_about_me', 'xss_clean');
$this->form_validation->set_error_delimiters('', '<br />');
@@ -157,10 +157,14 @@ public function profile()
$id = $this->session->userdata('user_id');
- $this->form_validation->set_rules('display_name', 'lang:form_display_name', 'max_length[50]');
+ $this->form_validation->set_rules('display_name', 'lang:form_display_name', 'max_length[50]|xss_clean');
$this->form_validation->set_rules('password', 'lang:form_password', 'matches[password_retype]');
$this->form_validation->set_rules('password_retype', 'lang:form_retype_password', '');
$this->form_validation->set_rules('email', 'lang:form_email', 'required|valid_email');
+ $this->form_validation->set_rules('website', 'lang:form_website', 'xss_clean');
+ $this->form_validation->set_rules('msn_messenger', 'lang:form_msn_messenger', 'xss_clean');
+ $this->form_validation->set_rules('jabber', 'lang:form_jabber', 'xss_clean');
+ $this->form_validation->set_rules('about_me', 'lang:form_about_me', 'xss_clean');
$this->form_validation->set_error_delimiters('', '<br />');
@@ -25,7 +25,7 @@
</tr>
<tr>
<td width="150px" valign="top"><?php echo lang('form_content'); ?></td>
- <td><?php echo form_textarea(array('name' => 'content', 'id' => 'content', 'rows' => '20', 'cols' => '100', 'value' => set_value('content', isset($page_data['content']) ? $page_data['content'] : ''))); ?></td>
+ <td><?php echo form_textarea(array('name' => 'content', 'id' => 'content', 'rows' => '20', 'cols' => '100', 'value' => set_value('content', isset($page_data['content']) ? htmlentities($page_data['content']) : ''))); ?></td>
</tr>
</table>
</fieldset>
@@ -25,11 +25,11 @@
</tr>
<tr>
<td width="150px" valign="top"><?php echo lang('form_excerpt'); ?></td>
- <td><?php echo form_textarea(array('name' => 'excerpt', 'id' => 'excerpt', 'rows' => '10', 'cols' => '100', 'value' => set_value('excerpt', isset($post['excerpt']) ? $post['excerpt'] : ''))); ?></td>
+ <td><?php echo form_textarea(array('name' => 'excerpt', 'id' => 'excerpt', 'rows' => '10', 'cols' => '100', 'value' => set_value('excerpt', isset($post['excerpt']) ? htmlentities($post['excerpt']) : ''))); ?></td>
</tr>
<tr>
<td width="150px" valign="top"><?php echo lang('form_content'); ?></td>
- <td><?php echo form_textarea(array('name' => 'content', 'id' => 'content', 'rows' => '20', 'cols' => '100', 'value' => set_value('content', isset($post['content']) ? $post['content'] : ''))); ?></td>
+ <td><?php echo form_textarea(array('name' => 'content', 'id' => 'content', 'rows' => '20', 'cols' => '100', 'value' => set_value('content', isset($post['content']) ? htmlentities($post['content']) : ''))); ?></td>
</tr>
</table>
</fieldset>
View
@@ -16,8 +16,8 @@
<div class="main">
<p>Please choose what you would like to do: <br /><br />
- <a href="install.php">Install Open Blog</a> - choose this option, if you would like to install Open Blog 1.2.0<br />
- <a href="update.php">Update Open Blog</a> - choose this option, if you would like to update your existing 1.1.0 installation to 1.2.0<br />
+ <a href="install.php">Install Open Blog</a> - choose this option, if you would like to install Open Blog 1.2.1<br />
+ <a href="update.php">Update Open Blog</a> - choose this option, if you would like to update your existing 1.1.0 installation to 1.2.1<br />
<a href="migrate.php">Migrate from Wordpress</a> - choose this option, if you would like to migrate from Wordpress 2.x
</p>
</div>
@@ -1,4 +1,4 @@
<div class="title">
<span class="sitename">Open Blog</span>
- <div class="slogan">Update to 1.2.0</div>
+ <div class="slogan">Update to 1.2.1</div>
</div>
@@ -35,7 +35,7 @@
unlink('../.htaccess');
}
- echo 'Open Blog has been successfully updated to version 1.2.0.<br /><br />
+ echo 'Open Blog has been successfully updated to version 1.2.1.<br /><br />
Before you can start using your blog, you must delete the <strong>install/</strong> directory.<br /><br />
When you are done, go to your <a href="' . $config['base_url'] . '" target="_blank">blog home page</a>.';
}
View
@@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
-<title>Open Blog update to 1.2.0</title>
+<title>Open Blog update to 1.2.1</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="includes/style/main.css" media="screen"/>
</head>

0 comments on commit f452596

Please sign in to comment.