]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Also prohibit , (comma) in hostnames, proposed by David
authorderaadt@openbsd.org <deraadt@openbsd.org>
Fri, 21 Feb 2025 18:22:41 +0000 (18:22 +0000)
committerDamien Miller <djm@mindrot.org>
Tue, 25 Feb 2025 09:57:25 +0000 (20:57 +1100)
Leadbeater ok djm millert

OpenBSD-Commit-ID: 2837fa31dc6e81976f510f0a259edaa559b20b07

ssh.c

diff --git a/ssh.c b/ssh.c
index d4e872c431a6cbb50bf51d50438e77787c521615..ff6249273da328ff04def71eb94e7cd4eca5e74b 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.604 2025/02/15 01:48:30 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.605 2025/02/21 18:22:41 deraadt Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -639,7 +639,7 @@ valid_hostname(const char *s)
        if (*s == '-')
                return 0;
        for (i = 0; s[i] != 0; i++) {
-               if (strchr("'`\"$\\;&<>|(){}", s[i]) != NULL ||
+               if (strchr("'`\"$\\;&<>|(){},", s[i]) != NULL ||
                    isspace((u_char)s[i]) || iscntrl((u_char)s[i]))
                        return 0;
        }