From 9eb7eb3ada927dbf9123afd7275a2b6877a9f4e8 Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Wed, 18 Nov 2015 11:17:46 +0100 Subject: [PATCH] Fix for signup with short usernames --- pillar/application/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pillar/application/__init__.py b/pillar/application/__init__.py index a90bab57..c9dd70f5 100644 --- a/pillar/application/__init__.py +++ b/pillar/application/__init__.py @@ -100,6 +100,8 @@ def validate_token(): username = "{0}{1}".format(username, index) return make_unique_username(username, index=index) return username + # Check for min length of username (otherwise validation fails) + username = "___{0}".format(username) if len(username) < 3 else username username = make_unique_username(username) full_name = username