From 5199b9dc602b462e33708541cf6134635a3ac440 Mon Sep 17 00:00:00 2001 From: shish Date: Sun, 28 Oct 2007 01:30:26 +0000 Subject: [PATCH] stricter tag sanitising git-svn-id: file:///home/shish/svn/shimmie2/trunk@586 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 5623452d..320364e4 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -114,7 +114,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) {