mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07:00
parent
39ee27785c
commit
344e47dcfb
8 changed files with 67 additions and 23 deletions
|
@ -452,6 +452,7 @@ void WebApplication::configure()
|
|||
|
||||
m_isClickjackingProtectionEnabled = pref->isWebUiClickjackingProtectionEnabled();
|
||||
m_isCSRFProtectionEnabled = pref->isWebUiCSRFProtectionEnabled();
|
||||
m_isHostHeaderValidationEnabled = pref->isWebUIHostHeaderValidationEnabled();
|
||||
m_isHttpsEnabled = pref->isWebUiHttpsEnabled();
|
||||
}
|
||||
|
||||
|
@ -542,7 +543,7 @@ Http::Response WebApplication::processRequest(const Http::Request &request, cons
|
|||
try {
|
||||
// block suspicious requests
|
||||
if ((m_isCSRFProtectionEnabled && isCrossSiteRequest(m_request))
|
||||
|| !validateHostHeader(m_domainList)) {
|
||||
|| (m_isHostHeaderValidationEnabled && !validateHostHeader(m_domainList))) {
|
||||
throw UnauthorizedHTTPError();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue