Merge pull request #4093 from thelounge/xpaw/fix-4092

Do not generate and send client certificate unless SASL EXTERNAL is requested
This commit is contained in:
Pavel Djundik 2020-11-04 15:30:53 +02:00 committed by GitHub
commit 2bbad443c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,8 +204,7 @@ Network.prototype.setIrcFrameworkOptions = function (client) {
this.irc.options.tls = this.tls; this.irc.options.tls = this.tls;
this.irc.options.rejectUnauthorized = this.rejectUnauthorized; this.irc.options.rejectUnauthorized = this.rejectUnauthorized;
this.irc.options.webirc = this.createWebIrc(client); this.irc.options.webirc = this.createWebIrc(client);
this.irc.options.client_certificate = null;
this.irc.options.client_certificate = this.tls ? ClientCertificate.get(this.uuid) : null;
if (!this.sasl) { if (!this.sasl) {
delete this.irc.options.sasl_mechanism; delete this.irc.options.sasl_mechanism;
@ -213,6 +212,7 @@ Network.prototype.setIrcFrameworkOptions = function (client) {
} else if (this.sasl === "external") { } else if (this.sasl === "external") {
this.irc.options.sasl_mechanism = "EXTERNAL"; this.irc.options.sasl_mechanism = "EXTERNAL";
this.irc.options.account = {}; this.irc.options.account = {};
this.irc.options.client_certificate = ClientCertificate.get(this.uuid);
} else if (this.sasl === "plain") { } else if (this.sasl === "plain") {
delete this.irc.options.sasl_mechanism; delete this.irc.options.sasl_mechanism;
this.irc.options.account = { this.irc.options.account = {