From c0ac7386e9dcc9d19cfbe5bd65bca3cdd29910fc Mon Sep 17 00:00:00 2001 From: Dan Notestein <dan@syncad.com> Date: Sat, 27 Jun 2020 16:59:26 -0400 Subject: [PATCH] [DLN] fix hive sync crash when name = 'hive-' --- hive/indexer/community.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hive/indexer/community.py b/hive/indexer/community.py index d57c5acad..1840731a8 100644 --- a/hive/indexer/community.py +++ b/hive/indexer/community.py @@ -147,7 +147,7 @@ class Community: def validated_name(cls, name): """Perform basic validation on community name, then search for id.""" if (name[:5] == 'hive-' - and name[5] in ['1', '2', '3'] + and len(name) > 5 and name[5] in ['1', '2', '3'] and re.match(r'^hive-[123]\d{4,6}$', name)): return name return None -- GitLab