Browse Source

Put WebUI security related options into a groupbox

adaptive-webui-19844
Chocobo1 6 years ago
parent
commit
58be2d4bc2
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 81
      src/gui/optionsdialog.ui
  2. 35
      src/webui/www/private/preferences_content.html

81
src/gui/optionsdialog.ui

@ -3155,49 +3155,58 @@ Specify an IPv4 or IPv6 address. You can specify "0.0.0.0" for any IPv
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="checkClickjacking"> <widget class="QGroupBox" name="groupBox_3">
<property name="text">
<string>Enable clickjacking protection</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkCSRFProtection">
<property name="text">
<string>Enable Cross-Site Request Forgery (CSRF) protection</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupHostHeaderValidation">
<property name="title"> <property name="title">
<string>Enable Host header validation</string> <string>Security</string>
</property> </property>
<property name="checkable"> <layout class="QVBoxLayout" name="verticalLayout_33">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_32">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_10"> <widget class="QCheckBox" name="checkClickjacking">
<item> <property name="text">
<widget class="QLabel" name="labelServerDomains"> <string>Enable clickjacking protection</string>
<property name="text"> </property>
<string>Server domains:</string> </widget>
</property> </item>
</widget> <item>
</item> <widget class="QCheckBox" name="checkCSRFProtection">
<item> <property name="text">
<widget class="QLineEdit" name="textServerDomains"> <string>Enable Cross-Site Request Forgery (CSRF) protection</string>
<property name="toolTip"> </property>
<string>Whitelist for filtering HTTP Host header values. </widget>
</item>
<item>
<widget class="QGroupBox" name="groupHostHeaderValidation">
<property name="title">
<string>Enable Host header validation</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_32">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLabel" name="labelServerDomains">
<property name="text">
<string>Server domains:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="textServerDomains">
<property name="toolTip">
<string>Whitelist for filtering HTTP Host header values.
In order to defend against DNS rebinding attack, In order to defend against DNS rebinding attack,
you should put in domain names used by WebUI server. you should put in domain names used by WebUI server.
Use ';' to split multiple entries. Can use wildcard '*'.</string> Use ';' to split multiple entries. Can use wildcard '*'.</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item>
</layout>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>

35
src/webui/www/private/preferences_content.html

@ -411,7 +411,6 @@
<legend>QBT_TR(Web User Interface (Remote control))QBT_TR[CONTEXT=OptionsDialog]</legend> <legend>QBT_TR(Web User Interface (Remote control))QBT_TR[CONTEXT=OptionsDialog]</legend>
<label class="leftLabelMedium" for="webui_address_value">QBT_TR(IP address:)QBT_TR[CONTEXT=OptionsDialog]</label><input type="text" id="webui_address_value" /> <label class="leftLabelMedium" for="webui_address_value">QBT_TR(IP address:)QBT_TR[CONTEXT=OptionsDialog]</label><input type="text" id="webui_address_value" />
<label for="webui_port_value" style="margin-left: 10px;">QBT_TR(Port:)QBT_TR[CONTEXT=OptionsDialog]</label><input type="text" id="webui_port_value" style="width: 4em;" /><br/> <label for="webui_port_value" style="margin-left: 10px;">QBT_TR(Port:)QBT_TR[CONTEXT=OptionsDialog]</label><input type="text" id="webui_port_value" style="width: 4em;" /><br/>
<label class="leftLabelMedium" for="webui_domain_textarea">QBT_TR(Server domains:)QBT_TR[CONTEXT=OptionsDialog]</label><textarea id="webui_domain_textarea" rows="1" cols="70"></textarea><br/>
<input type="checkbox" id="webui_upnp_checkbox" /> <input type="checkbox" id="webui_upnp_checkbox" />
<label for="webui_upnp_checkbox">QBT_TR(Use UPnP / NAT-PMP to forward the port from my router)QBT_TR[CONTEXT=OptionsDialog]</label><br/> <label for="webui_upnp_checkbox">QBT_TR(Use UPnP / NAT-PMP to forward the port from my router)QBT_TR[CONTEXT=OptionsDialog]</label><br/>
<fieldset class="settings"> <fieldset class="settings">
@ -449,18 +448,28 @@
</div> </div>
</fieldset> </fieldset>
<div class="formRow"> <fieldset class="settings">
<input type="checkbox" id="clickjacking_protection_checkbox" /> <legend>QBT_TR(Security)QBT_TR[CONTEXT=OptionsDialog]</legend>
<label for="clickjacking_protection_checkbox">QBT_TR(Enable clickjacking protection)QBT_TR[CONTEXT=OptionsDialog]</label> <div class="formRow">
</div> <input type="checkbox" id="clickjacking_protection_checkbox" />
<div class="formRow"> <label for="clickjacking_protection_checkbox">QBT_TR(Enable clickjacking protection)QBT_TR[CONTEXT=OptionsDialog]</label>
<input type="checkbox" id="csrf_protection_checkbox" /> </div>
<label for="csrf_protection_checkbox">QBT_TR(Enable Cross-Site Request Forgery (CSRF) protection)QBT_TR[CONTEXT=OptionsDialog]</label> <div class="formRow">
</div> <input type="checkbox" id="csrf_protection_checkbox" />
<div class="formRow"> <label for="csrf_protection_checkbox">QBT_TR(Enable Cross-Site Request Forgery (CSRF) protection)QBT_TR[CONTEXT=OptionsDialog]</label>
<input type="checkbox" id="host_header_validation_checkbox" /> </div>
<label for="host_header_validation_checkbox">QBT_TR(Enable Host header validation)QBT_TR[CONTEXT=OptionsDialog]</label>
</div> <fieldset class="settings">
<legend>
<input type="checkbox" id="host_header_validation_checkbox" onclick="updateHostHeaderValidationSettings();" />
<label for="host_header_validation_checkbox">QBT_TR(Enable Host header validation)QBT_TR[CONTEXT=OptionsDialog]</label>
</legend>
<div class="formRow">
<label class="leftLabelMedium" for="webui_domain_textarea">QBT_TR(Server domains:)QBT_TR[CONTEXT=OptionsDialog]</label>
<textarea id="webui_domain_textarea" rows="1" cols="60"></textarea>
</div>
</fieldset>
</fieldset>
</fieldset> </fieldset>
<fieldset class="settings"> <fieldset class="settings">

Loading…
Cancel
Save