From 7fa9d11512d8268c824d89ada0a5446816f32827 Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 13 Mar 2020 10:04:12 +0000 Subject: [PATCH] hard-code one bad case --- core/imageboard/tag.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/imageboard/tag.php b/core/imageboard/tag.php index e36b249f..5db83ffd 100644 --- a/core/imageboard/tag.php +++ b/core/imageboard/tag.php @@ -93,6 +93,8 @@ class Tag $tag = preg_replace("/^(\.+[\/\\\\])+/", "", $tag); # trailing slashes? $tag = trim($tag, ", \t\n\r\0\x0B"); + if($tag == ".") $tag = ""; // hard-code one bad case... + if (mb_strlen($tag, 'UTF-8') > 255) { throw new ScoreException("The tag below is longer than 255 characters, please use a shorter tag.\n$tag\n"); }