mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -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
@@ -449,6 +449,16 @@ void Preferences::setWebUiLocalAuthEnabled(bool enabled)
|
||||
setValue("Preferences/WebUI/LocalHostAuth", enabled);
|
||||
}
|
||||
|
||||
QString Preferences::getServerDomains() const
|
||||
{
|
||||
return value("Preferences/WebUI/ServerDomains", "*").toString();
|
||||
}
|
||||
|
||||
void Preferences::setServerDomains(const QString &str)
|
||||
{
|
||||
setValue("Preferences/WebUI/ServerDomains", str);
|
||||
}
|
||||
|
||||
quint16 Preferences::getWebUiPort() const
|
||||
{
|
||||
return value("Preferences/WebUI/Port", 8080).toInt();
|
||||
|
||||
Reference in New Issue
Block a user