mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
Don't let users change their fullname to be whitespace.
(imported from commit 015fc7cbc06acd5057952a3f09a9b6d3fe68d9fd)
This commit is contained in:
@@ -212,7 +212,10 @@ def compute_mit_user_fullname(email):
|
||||
if proc.returncode == 0:
|
||||
# Parse e.g. 'starnine:*:84233:101:Athena Consulting Exchange User,,,:/mit/starnine:/bin/bash'
|
||||
# for the 4th passwd entry field, aka the person's name.
|
||||
return out.split(':')[4].split(',')[0]
|
||||
hesiod_name = out.split(':')[4].split(',')[0].strip()
|
||||
if hesiod_name == "":
|
||||
return email
|
||||
return hesiod_name
|
||||
elif match_user:
|
||||
return match_user.group(1).lower() + "@" + match_user.group(2).upper()[1:]
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user