mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23: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
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue