mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-10-27 13:52:20 +03:00
Check any input username for validity
Check possible inputs of username for malicious code. 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
ebcd6eee3c
commit
d97a5930c9
@@ -194,6 +194,10 @@ int ssh_config_parse_uri(const char *tok,
|
||||
if (*username == NULL) {
|
||||
goto error;
|
||||
}
|
||||
rc = ssh_check_username_syntax(*username);
|
||||
if (rc != SSH_OK) {
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
tok = endp + 1;
|
||||
/* If there is second @ character, this does not look like our URI */
|
||||
|
||||
Reference in New Issue
Block a user