mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-18 19:50:18 +00:00
Updated STS upgrade handling to fall back to the current connection port when servers omit a port in the STS capability, enabling TLS upgrades for non-TLS connections in that case.
This commit is contained in:
@@ -553,7 +553,15 @@ sts_handle_capability (struct server *serv, const char *value)
|
|||||||
{
|
{
|
||||||
if (!has_port)
|
if (!has_port)
|
||||||
{
|
{
|
||||||
return FALSE;
|
if (serv->port > 0)
|
||||||
|
{
|
||||||
|
port = (guint16) serv->port;
|
||||||
|
has_port = TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
if (serv->sts_upgrade_in_progress)
|
if (serv->sts_upgrade_in_progress)
|
||||||
|
|||||||
Reference in New Issue
Block a user