mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 16:00:18 +00:00
Updated STS policy handling to require an active connection port when already on TLS, ignoring any advertised port token before storing the profile.
This commit is contained in:
@@ -593,14 +593,15 @@ sts_handle_capability (struct server *serv, const char *value)
|
||||
{
|
||||
time_t now = time (NULL);
|
||||
time_t expires_at = now + (time_t) duration;
|
||||
guint16 effective_port = serv->port > 0 ? (guint16) serv->port : port;
|
||||
guint16 effective_port = 0;
|
||||
sts_profile *profile;
|
||||
|
||||
if (effective_port == 0)
|
||||
if (serv->port <= 0)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
effective_port = (guint16) serv->port;
|
||||
profile = sts_profile_new (hostname, effective_port, expires_at, duration,
|
||||
has_preload ? preload : FALSE);
|
||||
sts_profile_store (profile);
|
||||
|
||||
Reference in New Issue
Block a user