aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/auth
diff options
context:
space:
mode:
authorLoic Dachary <loic@dachary.org>2016-01-12 18:39:28 +0100
committerChristopher Allan Webber <cwebber@dustycloud.org>2016-01-21 11:56:41 -0800
commitbbe085565166059157957030feea9fefa2a0d835 (patch)
tree28d55f3b710a38b2b22673e4100506d530d36753 /mediagoblin/auth
parent2fdc14a2424d7687358598441db8bcfd8fe9eb69 (diff)
downloadmediagoblin-bbe085565166059157957030feea9fefa2a0d835.tar.lz
mediagoblin-bbe085565166059157957030feea9fefa2a0d835.tar.xz
mediagoblin-bbe085565166059157957030feea9fefa2a0d835.zip
Fix #1096 - allow - in usernames
Signed-off-by: Loic Dachary <loic@dachary.org>
Diffstat (limited to 'mediagoblin/auth')
-rw-r--r--mediagoblin/auth/tools.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mediagoblin/auth/tools.py b/mediagoblin/auth/tools.py
index 5a47dae4..9c16a980 100644
--- a/mediagoblin/auth/tools.py
+++ b/mediagoblin/auth/tools.py
@@ -57,7 +57,7 @@ def normalize_user_or_email_field(allow_email=True, allow_user=True):
if not allow_user:
raise wtforms.ValidationError(nouser_msg)
wtforms.validators.Length(min=3, max=30)(form, field)
- wtforms.validators.Regexp(r'^\w+$')(form, field)
+ wtforms.validators.Regexp(r'^[-_\w]+$')(form, field)
field.data = field.data.lower()
if field.data is None: # should not happen, but be cautious anyway
raise wtforms.ValidationError(message)