Disable changing TLS if STS is enforced
This commit is contained in:
parent
d9985e7318
commit
568427ca98
@ -65,10 +65,18 @@
|
||||
type="checkbox"
|
||||
name="tls"
|
||||
:checked="defaults.tls ? true : false"
|
||||
:disabled="config.lockNetwork ? true : false"
|
||||
:disabled="
|
||||
config.lockNetwork || defaults.hasSTSPolicy ? true : false
|
||||
"
|
||||
@change="onSecureChanged"
|
||||
/>
|
||||
Use secure connection (TLS)
|
||||
<span
|
||||
v-if="defaults.hasSTSPolicy"
|
||||
class="tooltipped tooltipped-n tooltipped-no-delay"
|
||||
aria-label="This network has a strict transport security policy, you will be unable to disable TLS"
|
||||
>🔒 STS</span
|
||||
>
|
||||
</label>
|
||||
<label class="tls">
|
||||
<input
|
||||
|
@ -396,7 +396,11 @@ Network.prototype.exportForEdit = function() {
|
||||
fieldsToReturn = ["name", "nick", "username", "password", "realname"];
|
||||
}
|
||||
|
||||
return _.pick(this, fieldsToReturn);
|
||||
const data = _.pick(this, fieldsToReturn);
|
||||
|
||||
data.hasSTSPolicy = !!STSPolicies.get(this.host);
|
||||
|
||||
return data;
|
||||
};
|
||||
|
||||
Network.prototype.export = function() {
|
||||
|
Loading…
Reference in New Issue
Block a user