mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06:00
Implement HTTP host header filtering
This filtering is required to defend against DNS rebinding attack.
This commit is contained in:
committed by
sledgehammer999
parent
18651c8d01
commit
0532d546d7
@@ -162,6 +162,7 @@ QByteArray prefjson::getPreferences()
|
||||
// Language
|
||||
data["locale"] = pref->getLocale();
|
||||
// HTTP Server
|
||||
data["web_ui_domain_list"] = pref->getServerDomains();
|
||||
data["web_ui_port"] = pref->getWebUiPort();
|
||||
data["web_ui_upnp"] = pref->useUPnPForWebUIPort();
|
||||
data["use_https"] = pref->isWebUiHttpsEnabled();
|
||||
@@ -396,6 +397,8 @@ void prefjson::setPreferences(const QString& json)
|
||||
}
|
||||
}
|
||||
// HTTP Server
|
||||
if (m.contains("web_ui_domain_list"))
|
||||
pref->setServerDomains(m["web_ui_domain_list"].toString());
|
||||
if (m.contains("web_ui_port"))
|
||||
pref->setWebUiPort(m["web_ui_port"].toUInt());
|
||||
if (m.contains("web_ui_upnp"))
|
||||
|
||||
Reference in New Issue
Block a user