mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Merge pull request #7976 from nextcloud/backport/7974/stable-3.16
[stable-3.16] always set a user if we got asked for one
This commit is contained in:
commit
50d18ab06d
@ -36,6 +36,13 @@ AccessManager::AccessManager(QObject *parent)
|
||||
: QNetworkAccessManager(parent)
|
||||
{
|
||||
setCookieJar(new CookieJar);
|
||||
connect(this, &QNetworkAccessManager::authenticationRequired, this, [this](QNetworkReply *reply, QAuthenticator *authenticator) {
|
||||
if (authenticator->user().isEmpty()) {
|
||||
qCWarning(lcAccessManager) << "Server requested authentication and we didn't provide a user, aborting ...";
|
||||
authenticator->setUser(QUuid::createUuid().toString());
|
||||
reply->abort();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
QByteArray AccessManager::generateRequestId()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user