fix: login failure on U17 (#1986)
Reviewed-on: #1986 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
parent
e2fe406017
commit
4e57bcd1ae
@ -23,7 +23,8 @@ app.use((req, _res, next) => {
|
||||
}
|
||||
|
||||
// U18 uses application/x-www-form-urlencoded even tho the data is JSON which Express doesn't like.
|
||||
if (req.headers["content-type"] == "application/x-www-form-urlencoded") {
|
||||
// U17 sets no Content-Type at all, which Express also doesn't like.
|
||||
if (!req.headers["content-type"] || req.headers["content-type"] == "application/x-www-form-urlencoded") {
|
||||
req.headers["content-type"] = "application/octet-stream";
|
||||
}
|
||||
|
||||
|
@ -82,9 +82,12 @@ export const loginController: RequestHandler = async (request, response) => {
|
||||
}
|
||||
} else {
|
||||
if (account.Nonce && account.ClientType != "webui" && !account.Dropped && !loginRequest.kick) {
|
||||
response.status(400).json({ error: "nonce still set" });
|
||||
// U17 seems to handle "nonce still set" like a login failure.
|
||||
if (version_compare(buildLabel, "2015.12.05.18.07") >= 0) {
|
||||
response.status(400).send({ error: "nonce still set" });
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
account.ClientType = loginRequest.ClientType;
|
||||
account.Nonce = nonce;
|
||||
|
@ -186,6 +186,7 @@ apiRouter.get("/getVendorInfo.php", getVendorInfoController);
|
||||
apiRouter.get("/hub", hubController);
|
||||
apiRouter.get("/hubInstances", hubInstancesController);
|
||||
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("/loginRewards.php", loginRewardsController);
|
||||
apiRouter.get("/logout.php", logoutController);
|
||||
@ -278,6 +279,7 @@ apiRouter.post("/playerSkills.php", playerSkillsController);
|
||||
apiRouter.post("/postGuildAdvertisement.php", postGuildAdvertisementController);
|
||||
apiRouter.post("/projectionManager.php", projectionManagerController);
|
||||
apiRouter.post("/purchase.php", purchaseController);
|
||||
apiRouter.post("/questControl.php", questControlController); // U17
|
||||
apiRouter.post("/redeemPromoCode.php", redeemPromoCodeController);
|
||||
apiRouter.post("/releasePet.php", releasePetController);
|
||||
apiRouter.post("/removeFromGuild.php", removeFromGuildController);
|
||||
|
@ -744,6 +744,10 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
|
||||
// Omit void fissures for versions prior to Dante Unbound to avoid script errors.
|
||||
if (buildLabel && version_compare(buildLabel, "2024.03.24.20.00") < 0) {
|
||||
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) {
|
||||
|
@ -12,6 +12,7 @@ export interface IWorldState {
|
||||
GlobalUpgrades: IGlobalUpgrade[];
|
||||
ActiveMissions: IFissure[];
|
||||
NodeOverrides: INodeOverride[];
|
||||
PVPChallengeInstances: IPVPChallengeInstance[];
|
||||
EndlessXpChoices: IEndlessXpChoice[];
|
||||
SeasonInfo: {
|
||||
Activation: IMongoDate;
|
||||
@ -130,6 +131,21 @@ 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 {
|
||||
Category: string;
|
||||
Choices: string[];
|
||||
|
Loading…
x
Reference in New Issue
Block a user