mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Use UTF-8 for basic auth
Slightly off-specs, and fails for non UTF-8 setups, but the ownCloud server itself expects UTF-8 encoding.
This commit is contained in:
parent
eea8542fc0
commit
302fdeb1f9
@ -520,7 +520,7 @@ void ownCloudInfo::setupHeaders( QNetworkRequest & req, quint64 size )
|
||||
oCICredentials creds = _credentials.value(con);
|
||||
QString concatenated = creds.user + QLatin1Char(':') + creds.passwd;
|
||||
const QString b(QLatin1String("Basic "));
|
||||
QByteArray data = b.toLocal8Bit() + concatenated.toLocal8Bit().toBase64();
|
||||
QByteArray data = b.toUtf8() + concatenated.toUtf8().toBase64();
|
||||
req.setRawHeader( QByteArray("Authorization"), data );
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user