]> git.wh0rd.org - tt-rss.git/commitdiff
tag_is_valid: add length checking
authorAndrew Dolgov <fox@bah.org.ru>
Mon, 1 Jun 2009 07:29:13 +0000 (11:29 +0400)
committerAndrew Dolgov <fox@bah.org.ru>
Mon, 1 Jun 2009 07:29:13 +0000 (11:29 +0400)
functions.php

index a1c8315f7ee71ccdea17496e8b6ce41f792ea41d..8f6ae89001deb4b0864e79b459fca82bc013ba5d 100644 (file)
        function tag_is_valid($tag) {
                if ($tag == '') return false;
                if (preg_match("/^[0-9]*$/", $tag)) return false;
+               if (mb_strlen($tag) > 250) return false;
 
                if (function_exists('iconv')) {
                        $tag = iconv("utf-8", "utf-8", $tag);