Compare commits

..

1 Commits

Author SHA1 Message Date
a9c3373628 fix: login failure on U16
All checks were successful
Build / build (pull_request) Successful in 58s
Build / build (push) Successful in 1m31s
2025-05-06 03:11:11 +02:00
5 changed files with 3 additions and 29 deletions

View File

@ -23,8 +23,7 @@ app.use((req, _res, next) => {
} }
// U18 uses application/x-www-form-urlencoded even tho the data is JSON which Express doesn't like. // U18 uses application/x-www-form-urlencoded even tho the data is JSON which Express doesn't like.
// U17 sets no Content-Type at all, which Express also doesn't like. if (req.headers["content-type"] == "application/x-www-form-urlencoded") {
if (!req.headers["content-type"] || req.headers["content-type"] == "application/x-www-form-urlencoded") {
req.headers["content-type"] = "application/octet-stream"; req.headers["content-type"] = "application/octet-stream";
} }

View File

@ -82,11 +82,8 @@ export const loginController: RequestHandler = async (request, response) => {
} }
} else { } else {
if (account.Nonce && account.ClientType != "webui" && !account.Dropped && !loginRequest.kick) { if (account.Nonce && account.ClientType != "webui" && !account.Dropped && !loginRequest.kick) {
// U17 seems to handle "nonce still set" like a login failure. response.status(400).json({ error: "nonce still set" });
if (version_compare(buildLabel, "2015.12.05.18.07") >= 0) { return;
response.status(400).send({ error: "nonce still set" });
return;
}
} }
account.ClientType = loginRequest.ClientType; account.ClientType = loginRequest.ClientType;

View File

@ -186,7 +186,6 @@ apiRouter.get("/getVendorInfo.php", getVendorInfoController);
apiRouter.get("/hub", hubController); apiRouter.get("/hub", hubController);
apiRouter.get("/hubInstances", hubInstancesController); apiRouter.get("/hubInstances", hubInstancesController);
apiRouter.get("/inbox.php", inboxController); apiRouter.get("/inbox.php", inboxController);
apiRouter.get("/getMessages.php", inboxController); // unsure if this is correct, but needed for U17
apiRouter.get("/inventory.php", inventoryController); apiRouter.get("/inventory.php", inventoryController);
apiRouter.get("/loginRewards.php", loginRewardsController); apiRouter.get("/loginRewards.php", loginRewardsController);
apiRouter.get("/logout.php", logoutController); apiRouter.get("/logout.php", logoutController);
@ -279,7 +278,6 @@ apiRouter.post("/playerSkills.php", playerSkillsController);
apiRouter.post("/postGuildAdvertisement.php", postGuildAdvertisementController); apiRouter.post("/postGuildAdvertisement.php", postGuildAdvertisementController);
apiRouter.post("/projectionManager.php", projectionManagerController); apiRouter.post("/projectionManager.php", projectionManagerController);
apiRouter.post("/purchase.php", purchaseController); apiRouter.post("/purchase.php", purchaseController);
apiRouter.post("/questControl.php", questControlController); // U17
apiRouter.post("/redeemPromoCode.php", redeemPromoCodeController); apiRouter.post("/redeemPromoCode.php", redeemPromoCodeController);
apiRouter.post("/releasePet.php", releasePetController); apiRouter.post("/releasePet.php", releasePetController);
apiRouter.post("/removeFromGuild.php", removeFromGuildController); apiRouter.post("/removeFromGuild.php", removeFromGuildController);

View File

@ -744,10 +744,6 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
// Omit void fissures for versions prior to Dante Unbound to avoid script errors. // Omit void fissures for versions prior to Dante Unbound to avoid script errors.
if (buildLabel && version_compare(buildLabel, "2024.03.24.20.00") < 0) { if (buildLabel && version_compare(buildLabel, "2024.03.24.20.00") < 0) {
worldState.ActiveMissions = []; worldState.ActiveMissions = [];
if (version_compare(buildLabel, "2017.10.12.17.04") < 0) {
// Old versions seem to really get hung up on not being able to load these.
worldState.PVPChallengeInstances = [];
}
} }
if (config.worldState?.starDays) { if (config.worldState?.starDays) {

View File

@ -12,7 +12,6 @@ export interface IWorldState {
GlobalUpgrades: IGlobalUpgrade[]; GlobalUpgrades: IGlobalUpgrade[];
ActiveMissions: IFissure[]; ActiveMissions: IFissure[];
NodeOverrides: INodeOverride[]; NodeOverrides: INodeOverride[];
PVPChallengeInstances: IPVPChallengeInstance[];
EndlessXpChoices: IEndlessXpChoice[]; EndlessXpChoices: IEndlessXpChoice[];
SeasonInfo: { SeasonInfo: {
Activation: IMongoDate; Activation: IMongoDate;
@ -131,21 +130,6 @@ export interface ILiteSortie {
}[]; }[];
} }
export interface IPVPChallengeInstance {
_id: IOid;
challengeTypeRefID: string;
startDate: IMongoDate;
endDate: IMongoDate;
params: {
n: string; // "ScriptParamValue";
v: number;
}[];
isGenerated: boolean;
PVPMode: string;
subChallenges: IOid[];
Category: string; // "PVPChallengeTypeCategory_WEEKLY" | "PVPChallengeTypeCategory_WEEKLY_ROOT" | "PVPChallengeTypeCategory_DAILY";
}
export interface IEndlessXpChoice { export interface IEndlessXpChoice {
Category: string; Category: string;
Choices: string[]; Choices: string[];