mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
Use qUtf8Printable() for logging strings
qDebug(), qInfo(), qWarning(), qCritical(), qFatal() expect %s arguments to be UTF-8 encoded, while qPrintable() converts to local 8-bit encoding. Therefore qUtf8Printable() should be used for logging strings instead of qPrintable().
This commit is contained in:
@@ -195,7 +195,7 @@ void WebApplication::action_public_login()
|
||||
else {
|
||||
QString addr = env().clientAddress.toString();
|
||||
increaseFailedAttempts();
|
||||
qDebug("client IP: %s (%d failed attempts)", qPrintable(addr), failedAttempts());
|
||||
qDebug("client IP: %s (%d failed attempts)", qUtf8Printable(addr), failedAttempts());
|
||||
print(QByteArray("Fails."), Http::CONTENT_TYPE_TXT);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user