Disallow URL override of network-related fields on the client when the network is locked

This commit is contained in:
Jérémie Astori 2018-08-11 18:06:23 -04:00
parent 8a71d1df70
commit 174c6c744c
No known key found for this signature in database
GPG key ID: B9A4F245CD67BDE8

View file

@ -176,6 +176,12 @@ function parseOverrideParams(params, data) {
continue;
}
// When the network is locked, URL overrides should not affect disabled fields
if (data.lockNetwork &&
["host", "port", "tls", "rejectUnauthorized"].includes(key)) {
continue;
}
if (key === "join") {
value = value.split(",").map((chan) => {
if (!chan.match(/^[#&!+]/)) {