diff --git a/lib/private/SystemTag/SystemTagManager.php b/lib/private/SystemTag/SystemTagManager.php index 4f05d40c34c10..8bbd36c384fcf 100644 --- a/lib/private/SystemTag/SystemTagManager.php +++ b/lib/private/SystemTag/SystemTagManager.php @@ -145,6 +145,7 @@ public function getTag(string $tagName, bool $userVisible, bool $userAssignable) } public function createTag(string $tagName, bool $userVisible, bool $userAssignable): ISystemTag { + $tagName = trim($tagName); // Length of name column is 64 $truncatedTagName = substr($tagName, 0, 64); $query = $this->connection->getQueryBuilder(); @@ -199,6 +200,7 @@ public function updateTag( $beforeUpdate = array_shift($tags); // Length of name column is 64 + $newName = trim($newName); $truncatedNewName = substr($newName, 0, 64); $afterUpdate = new SystemTag( $tagId,