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:
2026-01-25 18:26:20 -07:00
parent a0f0c48bc5
commit bc1d2e5f7a

View File

@@ -553,7 +553,15 @@ sts_handle_capability (struct server *serv, const char *value)
{
if (!has_port)
{
return FALSE;
if (serv->port > 0)
{
port = (guint16) serv->port;
has_port = TRUE;
}
else
{
return FALSE;
}
}
#ifdef USE_OPENSSL
if (serv->sts_upgrade_in_progress)