diff --git a/admin/action/create_page.php b/admin/action/create_page.php index ced2024..1a0d17c 100644 --- a/admin/action/create_page.php +++ b/admin/action/create_page.php @@ -6,7 +6,8 @@ include '../includes/session.php'; if(isset($_POST['submit'])) { - $post_url = $_POST['url']; + $post_url = preg_replace('/[^A-Za-z0-9,.-]/u', '', $_POST['url']); + $post_url = rtrim($post_url, ',\.\-'); $post_content = $_POST['content']; } if(!empty($post_url) && !empty($post_content)) { @@ -57,20 +58,15 @@
+ diff --git a/admin/action/create_post.php b/admin/action/create_post.php index e6a55ff..8d3c67a 100644 --- a/admin/action/create_post.php +++ b/admin/action/create_post.php @@ -6,9 +6,11 @@ include '../includes/session.php'; if(isset($_POST['submit'])) { - $post_date = date('Y-m-d-H'); - $post_tag = $_POST['tag']; - $post_url = $_POST['url']; + $post_date = date('Y-m-d-H-i'); + $post_tag = preg_replace('/[^A-Za-z0-9,.-]/u', '', $_POST['tag']); + $post_tag = rtrim($post_tag, ',\.\-'); + $post_url = preg_replace('/[^A-Za-z0-9,.-]/u', '', $_POST['url']); + $post_url = rtrim($post_url, ',\.\-'); $post_content = $_POST['content']; } if(!empty($post_tag) && !empty($post_url) && !empty($post_content)) { @@ -60,21 +62,15 @@
- + diff --git a/admin/action/edit_bio.php b/admin/action/edit_bio.php index e3d94f9..5afc9fb 100644 --- a/admin/action/edit_bio.php +++ b/admin/action/edit_bio.php @@ -37,7 +37,7 @@ - Edit post + Edit bio @@ -65,14 +65,8 @@
- @@ -57,14 +56,8 @@