mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +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>
This commit is contained in:
committed by
Andreas Schneider
parent
11bd6e6ad9
commit
c3234e5f94
@@ -152,7 +152,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