ui: disallow newlines in usernames (issue1034)

This commit is contained in:
Matt Mackall 2008-03-22 13:50:59 -05:00
parent 9454e6e5aa
commit 06bb84cfa6

View File

@ -351,6 +351,8 @@ class ui(object):
pass
if not user:
raise util.Abort(_("Please specify a username."))
if "\n" in user:
raise util.Abort(_("username %s contains a newline\n") % `user`)
return user
def shortuser(self, user):