mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
misc: Add function to check username syntax
Malicious code can be injected using the username with metacharacters, therefore the username must be validated before using it with any %u. Signed-off-by: Norbert Pocs <norbertpocs0@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
committed by
Jakub Jelen
parent
d7f7c952f2
commit
ebcd6eee3c
@@ -123,6 +123,7 @@ 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);
|
||||
int ssh_check_username_syntax(const char *username);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user