changeset 15624:be43234a6d60

sshrepo: add more safe characters (issue2983) Extended the list of safe characters introduced in 86fc364ca5f8 to include everything from pipes._safechars, which is only available on Unix platforms. Place "-" at the end of the range to avoid backslash-escape. New characters: @%+=:,
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 09 Dec 2011 15:50:33 +0100
parents fc8c7a5ccc4a
children efdcce3fd2d5
files mercurial/sshrepo.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/sshrepo.py	Thu Dec 08 16:01:44 2011 -0600
+++ b/mercurial/sshrepo.py	Fri Dec 09 15:50:33 2011 +0100
@@ -21,7 +21,7 @@
 
 def _serverquote(s):
     '''quote a string for the remote shell ... which we assume is sh'''
-    if re.match(r'[a-zA-Z0-9._\-/]*$', s):
+    if re.match('[a-zA-Z0-9@%_+=:,./-]*$', s):
         return s
     return "'%s'" % s.replace("'", "'\\''")