From 16f83a8f2b30a622ee5178fb98f29fced0f160f2 Mon Sep 17 00:00:00 2001 From: shish Date: Sun, 28 Oct 2007 01:31:14 +0000 Subject: [PATCH] stricter tag sanitising git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.1@587 7f39781d-f577-437e-ae19-be835c7a54ca --- core/database.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/database.class.php b/core/database.class.php index b72902dd..40529e82 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -93,7 +93,10 @@ class Database { } public function sanitise($tag) { - return preg_replace("/[\s?*]/", "", $tag); + $tag = preg_replace("/[\s?*]/", "", $tag); + $tag = preg_replace("/\.+/", ".", $tag); + $tag = preg_replace("/^[\.\/]+/", "", $tag); + return $tag; } private function build_search_querylet($terms) {