mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 05:38:06 -06:00
Add option to control CSRF protection
Some users are using WebUI with simple port-forwarding from their router, providing an option to control the protection will save them from setting up an non-trival web proxy. Closes #7274.
This commit is contained in:
@@ -463,6 +463,10 @@
|
||||
<input type="checkbox" id="clickjacking_protection_checkbox" />
|
||||
<label for="clickjacking_protection_checkbox">QBT_TR(Enable clickjacking protection)QBT_TR[CONTEXT=OptionsDialog]</label>
|
||||
</div>
|
||||
<div class="formRow">
|
||||
<input type="checkbox" id="csrf_protection_checkbox" />
|
||||
<label for="csrf_protection_checkbox">QBT_TR(Enable Cross-Site Request Forgery (CSRF) protection)QBT_TR[CONTEXT=OptionsDialog]</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="settings">
|
||||
@@ -1029,6 +1033,7 @@
|
||||
|
||||
// Security
|
||||
$('clickjacking_protection_checkbox').setProperty('checked', pref.web_ui_clickjacking_protection_enabled);
|
||||
$('csrf_protection_checkbox').setProperty('checked', pref.web_ui_csrf_protection_enabled);
|
||||
|
||||
// Update my dynamic domain name
|
||||
$('use_dyndns_checkbox').setProperty('checked', pref.dyndns_enabled);
|
||||
@@ -1322,6 +1327,7 @@
|
||||
settings.set('bypass_auth_subnet_whitelist', $('bypass_auth_subnet_whitelist_textarea').getProperty('value'));
|
||||
|
||||
settings.set('web_ui_clickjacking_protection_enabled', $('clickjacking_protection_checkbox').getProperty('checked'));
|
||||
settings.set('web_ui_csrf_protection_enabled', $('csrf_protection_checkbox').getProperty('checked'));
|
||||
|
||||
// Update my dynamic domain name
|
||||
settings.set('dyndns_enabled', $('use_dyndns_checkbox').getProperty('checked'));
|
||||
|
||||
Reference in New Issue
Block a user