Disallowed . and .. as tag

This commit is contained in:
Marcin Kurczewski 2013-10-20 12:14:44 +02:00
parent 4bfa2a019a
commit 3052a6f032

View file

@ -40,6 +40,9 @@ class Model_Tag extends RedBean_SimpleModel
if (!preg_match('/^[a-zA-Z0-9_.-]+$/i', $tag))
throw new SimpleException('Invalid tag "' . $tag . '"');
if (preg_match('/^\.\.?$/', $tag))
throw new SimpleException('Invalid tag "' . $tag . '"');
return $tag;
}