diff options
| author | Thomas E. Dickey <dickey@invisible-island.net> | 2021-08-07 14:33:59 +0000 |
|---|---|---|
| committer | Thomas E. Dickey <dickey@invisible-island.net> | 2021-08-07 14:33:59 +0000 |
| commit | 897dafd72e27dcef44054e8d6b420aff41302f29 (patch) | |
| tree | 2cf48589ca62d0d8f078492df0f445611accae58 | |
| parent | c3184959a468d2b5df698383f6abe8bef030f1e9 (diff) | |
| download | lynx-snapshots-897dafd72e27dcef44054e8d6b420aff41302f29.tar.gz | |
snapshot of project "lynx", label v2-9-0dev_8b
| -rw-r--r-- | CHANGES | 6 | ||||
| -rw-r--r-- | WWW/Library/Implementation/HTTP.c | 20 |
2 files changed, 23 insertions, 3 deletions
@@ -1,9 +1,11 @@ --- $LynxId: CHANGES,v 1.1092 2021/08/01 22:27:02 tom Exp $ +-- $LynxId: CHANGES,v 1.1093 2021/08/07 14:33:33 tom Exp $ =============================================================================== Changes since Lynx 2.8 release =============================================================================== -2021-07-31 (2.9.0dev.9) +2021-08-07 (2.9.0dev.9) +* strip user/password from ssl_host in HTLoadHTTP, incorrectly passed as + part of the server name indicator (Debian #991971) -TD * update de.po eo.po et.po sv.po tr.po from http://translationproject.org/latest/lynx diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c index 07e30d74..338a6ebd 100644 --- a/WWW/Library/Implementation/HTTP.c +++ b/WWW/Library/Implementation/HTTP.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTTP.c,v 1.179 2021/06/08 23:28:23 tom Exp $ + * $LynxId: HTTP.c,v 1.180 2021/08/07 14:33:59 tom Exp $ * * HyperText Transfer Protocol - Client implementation HTTP.c * =========================== @@ -764,6 +764,23 @@ static char *StripIpv6Brackets(char *host) } #endif +/* + * Remove user/password, if any, from the given host-string. + */ +#ifdef USE_SSL +static char *StripUserAuthents(char *host) +{ + char *p = strchr(host, '@'); + + if (p != NULL) { + char *q = host; + + while ((*q++ = *++p) != '\0') ; + } + return host; +} +#endif + /* Load Document from HTTP Server HTLoadHTTP() * ============================== * @@ -959,6 +976,7 @@ static int HTLoadHTTP(const char *arg, /* get host we're connecting to */ ssl_host = HTParse(url, "", PARSE_HOST); ssl_host = StripIpv6Brackets(ssl_host); + ssl_host = StripUserAuthents(ssl_host); #if defined(USE_GNUTLS_FUNCS) ret = gnutls_server_name_set(handle->gnutls_state, GNUTLS_NAME_DNS, |