mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 05:08:05 -06:00
Add option to control WebUI clickjacking protection
Some users actually want embedding WebUI into their custom build iframe. Closes #7370.
This commit is contained in:
committed by
sledgehammer999
parent
2a9c401db9
commit
6ad2a13386
@@ -576,6 +576,16 @@ void Preferences::setWebUiPassword(const QString &new_password)
|
||||
setValue("Preferences/WebUI/Password_ha1", md5.result().toHex());
|
||||
}
|
||||
|
||||
bool Preferences::isWebUiClickjackingProtectionEnabled() const
|
||||
{
|
||||
return value("Preferences/WebUI/ClickjackingProtection", true).toBool();
|
||||
}
|
||||
|
||||
void Preferences::setWebUiClickjackingProtectionEnabled(bool enabled)
|
||||
{
|
||||
setValue("Preferences/WebUI/ClickjackingProtection", enabled);
|
||||
}
|
||||
|
||||
bool Preferences::isWebUiHttpsEnabled() const
|
||||
{
|
||||
return value("Preferences/WebUI/HTTPS/Enabled", false).toBool();
|
||||
|
||||
@@ -194,6 +194,10 @@ public:
|
||||
QString getWebUiPassword() const;
|
||||
void setWebUiPassword(const QString &new_password);
|
||||
|
||||
// WebUI security
|
||||
bool isWebUiClickjackingProtectionEnabled() const;
|
||||
void setWebUiClickjackingProtectionEnabled(bool enabled);
|
||||
|
||||
// HTTPS
|
||||
bool isWebUiHttpsEnabled() const;
|
||||
void setWebUiHttpsEnabled(bool enabled);
|
||||
|
||||
Reference in New Issue
Block a user