mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 12:50:30 +09:00
CVE-2023-6004: misc: Add function to check allowed characters of a hostname
The hostname can be a domain name or an ip address. The colon has to be allowed because of IPv6 even it is prohibited in domain names. Signed-off-by: Norbert Pocs <norbertpocs0@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
committed by
Andreas Schneider
parent
b83368b2ed
commit
0ff85b034a
@@ -122,6 +122,8 @@ char *ssh_strreplace(const char *src, const char *pattern, const char *repl);
|
||||
ssize_t ssh_readn(int fd, void *buf, size_t nbytes);
|
||||
ssize_t ssh_writen(int fd, const void *buf, size_t nbytes);
|
||||
|
||||
int ssh_check_hostname_syntax(const char *hostname);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user