Fix rejectUnauthorized

This commit is contained in:
Pavel Djundik 2018-03-05 20:11:41 +02:00
parent e8c64b084e
commit 9188943261
2 changed files with 3 additions and 3 deletions

View File

@ -45,8 +45,8 @@
</div> </div>
<div class="col-sm-9 col-sm-offset-3"> <div class="col-sm-9 col-sm-offset-3">
<label class="tls"> <label class="tls">
<input type="checkbox" name="allowUnauthorized" {{#unless defaults.rejectUnauthorized}}checked{{/unless}} {{#if lockNetwork}}disabled{{/if}}> <input type="checkbox" name="rejectUnauthorized" {{#if defaults.rejectUnauthorized}}checked{{/if}} {{#if lockNetwork}}disabled{{/if}}>
Allow untrusted certificates Only allow trusted certificates
</label> </label>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>

View File

@ -178,7 +178,7 @@ Client.prototype.connect = function(args) {
host: args.host || "", host: args.host || "",
port: parseInt(args.port, 10) || (args.tls ? 6697 : 6667), port: parseInt(args.port, 10) || (args.tls ? 6697 : 6667),
tls: !!args.tls, tls: !!args.tls,
rejectUnauthorized: !args.allowUnauthorized, rejectUnauthorized: !!args.rejectUnauthorized,
password: args.password, password: args.password,
username: args.username || nick.replace(/[^a-zA-Z0-9]/g, ""), username: args.username || nick.replace(/[^a-zA-Z0-9]/g, ""),
realname: args.realname || "The Lounge User", realname: args.realname || "The Lounge User",