aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/auth/steps/LauncherLoginStep.cpp
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-12-28 09:54:23 -0800
committerGitHub <noreply@github.com>2022-12-28 09:54:23 -0800
commit67ac3da8a0eac959343fe86ca143b97f0f76543c (patch)
treefe340243603b2a5a743567e817aeab01ab44e8f5 /launcher/minecraft/auth/steps/LauncherLoginStep.cpp
parentc1e5179b5fb1e69c61bdbd3c6258e871882dfec5 (diff)
parent7a651bdc5310dffd19148e5f2046126324e2f53f (diff)
downloadPrismLauncher-67ac3da8a0eac959343fe86ca143b97f0f76543c.tar.gz
PrismLauncher-67ac3da8a0eac959343fe86ca143b97f0f76543c.tar.bz2
PrismLauncher-67ac3da8a0eac959343fe86ca143b97f0f76543c.zip
Merge pull request #684 from Scrumplex/logging-categories
Prevents private credentials from leaking in the logs of general users
Diffstat (limited to 'launcher/minecraft/auth/steps/LauncherLoginStep.cpp')
-rw-r--r--launcher/minecraft/auth/steps/LauncherLoginStep.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/launcher/minecraft/auth/steps/LauncherLoginStep.cpp b/launcher/minecraft/auth/steps/LauncherLoginStep.cpp
index 8c53f037..8a26cbe7 100644
--- a/launcher/minecraft/auth/steps/LauncherLoginStep.cpp
+++ b/launcher/minecraft/auth/steps/LauncherLoginStep.cpp
@@ -2,9 +2,10 @@
#include <QNetworkRequest>
+#include "Logging.h"
+#include "minecraft/auth/AccountTask.h"
#include "minecraft/auth/AuthRequest.h"
#include "minecraft/auth/Parsers.h"
-#include "minecraft/auth/AccountTask.h"
#include "net/NetUtils.h"
LauncherLoginStep::LauncherLoginStep(AccountData* data) : AuthStep(data) {
@@ -51,14 +52,10 @@ void LauncherLoginStep::onRequestDone(
auto requestor = qobject_cast<AuthRequest *>(QObject::sender());
requestor->deleteLater();
-#ifndef NDEBUG
- qDebug() << data;
-#endif
+ qCDebug(authCredentials()) << data;
if (error != QNetworkReply::NoError) {
qWarning() << "Reply error:" << error;
-#ifndef NDEBUG
- qDebug() << data;
-#endif
+ qCDebug(authCredentials()) << data;
if (Net::isApplicationError(error)) {
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
@@ -76,9 +73,7 @@ void LauncherLoginStep::onRequestDone(
if(!Parsers::parseMojangResponse(data, m_data->yggdrasilToken)) {
qWarning() << "Could not parse login_with_xbox response...";
-#ifndef NDEBUG
- qDebug() << data;
-#endif
+ qCDebug(authCredentials()) << data;
emit finished(
AccountTaskState::STATE_FAILED_SOFT,
tr("Failed to parse the Minecraft access token response.")