mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07:00
Merge pull request #8551 from Chocobo1/override
Fix warnings from linters
This commit is contained in:
commit
5261d4375f
32 changed files with 140 additions and 126 deletions
|
@ -456,7 +456,7 @@ void WebApplication::sendFile(const QString &path)
|
|||
qDebug("File %s was not found!", qUtf8Printable(path));
|
||||
throw NotFoundHTTPError();
|
||||
}
|
||||
|
||||
|
||||
if (file.size() > MAX_ALLOWED_FILESIZE) {
|
||||
qWarning("%s: exceeded the maximum allowed file size!", qUtf8Printable(path));
|
||||
throw InternalServerErrorHTTPError(tr("Exceeded the maximum allowed file size (%1)!")
|
||||
|
@ -597,7 +597,7 @@ bool WebApplication::isAuthNeeded()
|
|||
|
||||
bool WebApplication::isPublicAPI(const QString &scope, const QString &action) const
|
||||
{
|
||||
return m_publicAPIs.contains(QString::fromLatin1("%1/%2").arg(scope).arg(action));
|
||||
return m_publicAPIs.contains(QString::fromLatin1("%1/%2").arg(scope, action));
|
||||
}
|
||||
|
||||
void WebApplication::sessionStart()
|
||||
|
@ -661,7 +661,7 @@ bool WebApplication::isCrossSiteRequest(const Http::Request &request) const
|
|||
const bool isInvalid = !isSameOrigin(urlFromHostHeader(targetOrigin), originValue);
|
||||
if (isInvalid)
|
||||
LogMsg(tr("WebUI: Origin header & Target origin mismatch! Source IP: '%1'. Origin header: '%2'. Target origin: '%3'")
|
||||
.arg(m_env.clientAddress.toString()).arg(originValue).arg(targetOrigin)
|
||||
.arg(m_env.clientAddress.toString(), originValue, targetOrigin)
|
||||
, Log::WARNING);
|
||||
return isInvalid;
|
||||
}
|
||||
|
@ -670,7 +670,7 @@ bool WebApplication::isCrossSiteRequest(const Http::Request &request) const
|
|||
const bool isInvalid = !isSameOrigin(urlFromHostHeader(targetOrigin), refererValue);
|
||||
if (isInvalid)
|
||||
LogMsg(tr("WebUI: Referer header & Target origin mismatch! Source IP: '%1'. Referer header: '%2'. Target origin: '%3'")
|
||||
.arg(m_env.clientAddress.toString()).arg(refererValue).arg(targetOrigin)
|
||||
.arg(m_env.clientAddress.toString(), refererValue, targetOrigin)
|
||||
, Log::WARNING);
|
||||
return isInvalid;
|
||||
}
|
||||
|
@ -719,7 +719,7 @@ bool WebApplication::validateHostHeader(const QStringList &domains) const
|
|||
}
|
||||
|
||||
LogMsg(tr("WebUI: Invalid Host header. Request source IP: '%1'. Received Host header: '%2'")
|
||||
.arg(m_env.clientAddress.toString()).arg(m_request.headers[Http::HEADER_HOST])
|
||||
.arg(m_env.clientAddress.toString(), m_request.headers[Http::HEADER_HOST])
|
||||
, Log::WARNING);
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue