changeset 6351:eed0a6a05096

ui: disallow newlines in usernames (issue1034)
author Matt Mackall <mpm@selenic.com>
date Sat, 22 Mar 2008 13:50:59 -0500
parents 6aa4a3fa4e60
children 04d615b2d5e9
files mercurial/ui.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ui.py	Sat Mar 22 13:30:08 2008 -0500
+++ b/mercurial/ui.py	Sat Mar 22 13:50:59 2008 -0500
@@ -351,6 +351,8 @@
                 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):