Fix issues found by simplyoliver
This commit is contained in:
parent
2ce9e5ab15
commit
590917adbb
|
@ -244,6 +244,10 @@ func MiddlewareFortnite(c *fiber.Ctx) error {
|
||||||
return c.Status(fiber.StatusForbidden).JSON(aid.ErrorBadRequest("Invalid Access Token"))
|
return c.Status(fiber.StatusForbidden).JSON(aid.ErrorBadRequest("Invalid Access Token"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if person.GetLatestActiveBan() != nil {
|
||||||
|
return c.Status(fiber.StatusForbidden).JSON(aid.ErrorBadRequest("Account is banned"))
|
||||||
|
}
|
||||||
|
|
||||||
c.Locals("person", person)
|
c.Locals("person", person)
|
||||||
return c.Next()
|
return c.Next()
|
||||||
}
|
}
|
||||||
|
|
|
@ -600,8 +600,9 @@ func clientPurchaseCatalogEntryAction(c *fiber.Ctx, person *p.Person, profile *p
|
||||||
if err := c.BodyParser(&body); err != nil {
|
if err := c.BodyParser(&body); err != nil {
|
||||||
return fmt.Errorf("invalid Body")
|
return fmt.Errorf("invalid Body")
|
||||||
}
|
}
|
||||||
|
|
||||||
offer := fortnite.GetOfferByOfferId(body.OfferID)
|
shop := fortnite.NewRandomFortniteCatalog()
|
||||||
|
offer := shop.FindCosmeticOfferById(body.OfferID)
|
||||||
if offer == nil {
|
if offer == nil {
|
||||||
return fmt.Errorf("offer not found")
|
return fmt.Errorf("offer not found")
|
||||||
}
|
}
|
||||||
|
@ -701,12 +702,10 @@ func clientRefundMtxPurchaseAction(c *fiber.Ctx, person *p.Person, profile *p.Pr
|
||||||
return fmt.Errorf("not enough refund tickets")
|
return fmt.Errorf("not enough refund tickets")
|
||||||
}
|
}
|
||||||
|
|
||||||
if time.Now().After(purchase.FreeRefundExpiry) {
|
person.RefundTickets--
|
||||||
person.RefundTickets--
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, item := range purchase.Loot {
|
for _, item := range purchase.Loot {
|
||||||
profile.Items.DeleteItem(item.ID)
|
person.GetProfileFromType(item.ProfileType).Items.DeleteItem(item.ID)
|
||||||
|
person.GetProfileFromType(item.ProfileType).CreateItemRemovedChange(item.ID)
|
||||||
}
|
}
|
||||||
|
|
||||||
purchase.RefundedAt = time.Now()
|
purchase.RefundedAt = time.Now()
|
||||||
|
@ -747,7 +746,8 @@ func clientGiftCatalogEntryAction(c *fiber.Ctx, person *p.Person, profile *p.Pro
|
||||||
return fmt.Errorf("invalid Body")
|
return fmt.Errorf("invalid Body")
|
||||||
}
|
}
|
||||||
|
|
||||||
offer := fortnite.GetOfferByOfferId(body.OfferId)
|
shop := fortnite.NewRandomFortniteCatalog()
|
||||||
|
offer := shop.FindCosmeticOfferById(body.OfferId)
|
||||||
if offer == nil {
|
if offer == nil {
|
||||||
return fmt.Errorf("offer not found")
|
return fmt.Errorf("offer not found")
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,28 +22,6 @@ bEnableWebsockets=true
|
||||||
[OnlineSubsystem]
|
[OnlineSubsystem]
|
||||||
bHasVoiceEnabled=true
|
bHasVoiceEnabled=true
|
||||||
|
|
||||||
[Core.Log]
|
|
||||||
LogHttp=VeryVerbose
|
|
||||||
LogXmpp=VeryVerbose
|
|
||||||
LogBeacon=VeryVerbose
|
|
||||||
LogQos=VeryVerbose
|
|
||||||
LogOnline=VeryVerbose
|
|
||||||
LogOnlineGame=VeryVerbose
|
|
||||||
LogOnlineParty=VeryVerbose
|
|
||||||
LogParty=VeryVerbose
|
|
||||||
LogOnlineChat=VeryVerbose
|
|
||||||
LogGarbage=VeryVerbose
|
|
||||||
LogTemp=VeryVerbose
|
|
||||||
LogSourceControl=VeryVerbose
|
|
||||||
LogLootTables=VeryVerbose
|
|
||||||
LogMatchmakingServiceClient=VeryVerbose
|
|
||||||
LogMatchmakingServiceDedicatedServer=VeryVerbose
|
|
||||||
LogUAC=VeryVerbose
|
|
||||||
LogBattlEye=VeryVerbose
|
|
||||||
LogEasyAntiCheatServer=VeryVerbose
|
|
||||||
LogEasyAntiCheatClient=VeryVerbose
|
|
||||||
LogEasyAntiCheatNetComponent=VeryVerbose
|
|
||||||
|
|
||||||
[ConsoleVariables]
|
[ConsoleVariables]
|
||||||
n.VerifyPeer=0
|
n.VerifyPeer=0
|
||||||
FortMatchmakingV2.ContentBeaconFailureCancelsMatchmaking=0
|
FortMatchmakingV2.ContentBeaconFailureCancelsMatchmaking=0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user