Merge pull request #2154 from thelounge/xpaw/rejectUnauthorized-v2

Fix rejectUnauthorized
This commit is contained in:
Pavel Djundik 2018-03-06 12:51:56 +02:00 committed by GitHub
commit 4551c10a5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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",