Skip to content

Commit

Permalink
fix setups that use basic auth
Browse files Browse the repository at this point in the history
Signed-off-by: Jyrki Gadinger <[email protected]>
  • Loading branch information
nilsding committed Mar 10, 2025
1 parent de21c0c commit e38ac14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libsync/accessmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ AccessManager::AccessManager(QObject *parent)
{
setCookieJar(new CookieJar);
connect(this, &QNetworkAccessManager::authenticationRequired, this, [](QNetworkReply *reply, QAuthenticator *authenticator) {
Q_UNUSED(reply)

if (authenticator->user().isEmpty()) {
qCWarning(lcAccessManager) << "Server requested authentication and we didn't provide a user, aborting ...";
qCWarning(lcAccessManager) << "Server requested authentication and we didn't provide a user";
authenticator->setUser(QUuid::createUuid().toString());
reply->abort();
}
});
}
Expand Down

0 comments on commit e38ac14

Please sign in to comment.