Skip to content

Commit

Permalink
Merge pull request thelounge#4093 from thelounge/xpaw/fix-4092
Browse files Browse the repository at this point in the history
Do not generate and send client certificate unless SASL EXTERNAL is requested
  • Loading branch information
xPaw authored Nov 4, 2020
2 parents 69986b3 + a76e75f commit 2bbad44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/models/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ Network.prototype.setIrcFrameworkOptions = function (client) {
this.irc.options.tls = this.tls;
this.irc.options.rejectUnauthorized = this.rejectUnauthorized;
this.irc.options.webirc = this.createWebIrc(client);

this.irc.options.client_certificate = this.tls ? ClientCertificate.get(this.uuid) : null;
this.irc.options.client_certificate = null;

if (!this.sasl) {
delete this.irc.options.sasl_mechanism;
delete this.irc.options.account;
} else if (this.sasl === "external") {
this.irc.options.sasl_mechanism = "EXTERNAL";
this.irc.options.account = {};
this.irc.options.client_certificate = ClientCertificate.get(this.uuid);
} else if (this.sasl === "plain") {
delete this.irc.options.sasl_mechanism;
this.irc.options.account = {
Expand Down

0 comments on commit 2bbad44

Please sign in to comment.