Skip to content

Commit 487cf4c

Browse files
deraadt@openbsd.orgdjmdjm
authored andcommitted
upstream: Also prohibit , (comma) in hostnames, proposed by David
Leadbeater ok djm millert OpenBSD-Commit-ID: 2837fa31dc6e81976f510f0a259edaa559b20b07
1 parent 3bc6de9 commit 487cf4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ssh.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: ssh.c,v 1.604 2025/02/15 01:48:30 djm Exp $ */
1+
/* $OpenBSD: ssh.c,v 1.605 2025/02/21 18:22:41 deraadt Exp $ */
22
/*
33
* Author: Tatu Ylonen <ylo@cs.hut.fi>
44
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -639,7 +639,7 @@ valid_hostname(const char *s)
639639
if (*s == '-')
640640
return 0;
641641
for (i = 0; s[i] != 0; i++) {
642-
if (strchr("'`\"$\\;&<>|(){}", s[i]) != NULL ||
642+
if (strchr("'`\"$\\;&<>|(){},", s[i]) != NULL ||
643643
isspace((u_char)s[i]) || iscntrl((u_char)s[i]))
644644
return 0;
645645
}

0 commit comments

Comments
 (0)