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 class="col-sm-9 col-sm-offset-3">
<label class="tls">
<input type="checkbox" name="allowUnauthorized" {{#unless defaults.rejectUnauthorized}}checked{{/unless}} {{#if lockNetwork}}disabled{{/if}}>
Allow untrusted certificates
<input type="checkbox" name="rejectUnauthorized" {{#if defaults.rejectUnauthorized}}checked{{/if}} {{#if lockNetwork}}disabled{{/if}}>
Only allow trusted certificates
</label>
</div>
<div class="clearfix"></div>

View file

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