Fix token "0" being replaced
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
593f452986
commit
f505d43fc0
@ -843,7 +843,7 @@ QMap<QString, QString> MinecraftInstance::createCensorFilterFromSession(AuthSess
|
|||||||
{
|
{
|
||||||
addToFilter(sessionRef.session, tr("<SESSION ID>"));
|
addToFilter(sessionRef.session, tr("<SESSION ID>"));
|
||||||
}
|
}
|
||||||
if (sessionRef.access_token != "offline") {
|
if (sessionRef.access_token != "0") {
|
||||||
addToFilter(sessionRef.access_token, tr("<ACCESS TOKEN>"));
|
addToFilter(sessionRef.access_token, tr("<ACCESS TOKEN>"));
|
||||||
}
|
}
|
||||||
if(sessionRef.client_token.size()) {
|
if(sessionRef.client_token.size()) {
|
||||||
|
@ -374,6 +374,10 @@ bool AccountData::resumeStateFromV3(QJsonObject data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
yggdrasilToken = tokenFromJSONV3(data, "ygg");
|
yggdrasilToken = tokenFromJSONV3(data, "ygg");
|
||||||
|
// versions before 7.2 used "offline" as the offline token
|
||||||
|
if (yggdrasilToken.token == "offline")
|
||||||
|
yggdrasilToken.token = "0";
|
||||||
|
|
||||||
minecraftProfile = profileFromJSONV3(data, "profile");
|
minecraftProfile = profileFromJSONV3(data, "profile");
|
||||||
if(!entitlementFromJSONV3(data, minecraftEntitlement)) {
|
if(!entitlementFromJSONV3(data, minecraftEntitlement)) {
|
||||||
if(minecraftProfile.validity != Katabasis::Validity::None) {
|
if(minecraftProfile.validity != Katabasis::Validity::None) {
|
||||||
|
@ -94,7 +94,7 @@ MinecraftAccountPtr MinecraftAccount::createOffline(const QString &username)
|
|||||||
{
|
{
|
||||||
auto account = makeShared<MinecraftAccount>();
|
auto account = makeShared<MinecraftAccount>();
|
||||||
account->data.type = AccountType::Offline;
|
account->data.type = AccountType::Offline;
|
||||||
account->data.yggdrasilToken.token = "offline";
|
account->data.yggdrasilToken.token = "0";
|
||||||
account->data.yggdrasilToken.validity = Katabasis::Validity::Certain;
|
account->data.yggdrasilToken.validity = Katabasis::Validity::Certain;
|
||||||
account->data.yggdrasilToken.issueInstant = QDateTime::currentDateTimeUtc();
|
account->data.yggdrasilToken.issueInstant = QDateTime::currentDateTimeUtc();
|
||||||
account->data.yggdrasilToken.extra["userName"] = username;
|
account->data.yggdrasilToken.extra["userName"] = username;
|
||||||
|
Loading…
Reference in New Issue
Block a user