mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Implement HTTP host header filtering
This filtering is required to defend against DNS rebinding attack.
This commit is contained in:
parent
18651c8d01
commit
0532d546d7
10 changed files with 109 additions and 8 deletions
|
@ -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"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue