Disallowed . and .. as tag
This commit is contained in:
parent
4bfa2a019a
commit
3052a6f032
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue