mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 17: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
|
@ -331,6 +331,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
|||
connect(m_ui->textTrackers, &QPlainTextEdit::textChanged, this, &ThisType::enableApplyButton);
|
||||
#ifndef DISABLE_WEBUI
|
||||
// Web UI tab
|
||||
connect(m_ui->textSeverDomains, &QLineEdit::textChanged, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkWebUi, &QGroupBox::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->spinWebUiPort, qSpinBoxValueChanged, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkWebUIUPnP, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
|
@ -626,6 +627,7 @@ void OptionsDialog::saveOptions()
|
|||
// Web UI
|
||||
pref->setWebUiEnabled(isWebUiEnabled());
|
||||
if (isWebUiEnabled()) {
|
||||
pref->setServerDomains(m_ui->textSeverDomains->text());
|
||||
pref->setWebUiPort(webUiPort());
|
||||
pref->setUPnPForWebUIPort(m_ui->checkWebUIUPnP->isChecked());
|
||||
pref->setWebUiHttpsEnabled(m_ui->checkWebUiHttps->isChecked());
|
||||
|
@ -1013,6 +1015,7 @@ void OptionsDialog::loadOptions()
|
|||
// End Bittorrent preferences
|
||||
|
||||
// Web UI preferences
|
||||
m_ui->textSeverDomains->setText(pref->getServerDomains());
|
||||
m_ui->checkWebUi->setChecked(pref->isWebUiEnabled());
|
||||
m_ui->spinWebUiPort->setValue(pref->getWebUiPort());
|
||||
m_ui->checkWebUIUPnP->setChecked(pref->useUPnPForWebUIPort());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue