mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +09:00
CVE-2023-6004: config_parser: Allow multiple '@' in usernames
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
57ec9a35c6
commit
1dfde16f49
@@ -180,7 +180,7 @@ int ssh_config_parse_uri(const char *tok,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Username part (optional) */
|
/* Username part (optional) */
|
||||||
endp = strchr(tok, '@');
|
endp = strrchr(tok, '@');
|
||||||
if (endp != NULL) {
|
if (endp != NULL) {
|
||||||
/* Zero-length username is not valid */
|
/* Zero-length username is not valid */
|
||||||
if (tok == endp) {
|
if (tok == endp) {
|
||||||
|
|||||||
Reference in New Issue
Block a user