mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
allow WEBIRC to set the TLS flag over local plaintext connections
This commit is contained in:
parent
09a17b32be
commit
b7f66fb1de
2 changed files with 16 additions and 3 deletions
|
|
@ -58,9 +58,11 @@ func webircHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
|||
key = x
|
||||
}
|
||||
|
||||
// only accept "tls" flag if the gateway's connection to us is secure as well
|
||||
if strings.ToLower(key) == "tls" && client.flags[TLS] {
|
||||
secure = true
|
||||
if strings.ToLower(key) == "tls" {
|
||||
// only accept "tls" flag if the gateway's connection to us is secure as well
|
||||
if client.flags[TLS] || utils.AddrIsLocal(client.socket.conn.RemoteAddr()) {
|
||||
secure = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue