DestinyItemManager / DIM

Destiny Item Manager
https://destinyitemmanager.com
MIT License
2.03k stars 641 forks source link

Protect tags #10401

Closed bhollis closed 3 weeks ago

bhollis commented 3 weeks ago

This implements a few more protections for tags:

  1. Don't clean infos if the profile wasn't loaded remotely from Bungie.net. Any cached response, we won't clean infos.
  2. Don't clean infos if the profile from Bungie.net was minted >90s ago. This shouldn't really be necessary (and in some cases may delay cleaning if B.net is struggling) but also seems like a safe backstop.
  3. Don't clean any info for an item ID that's newer than the newest item ID in the store. This is to protect against theoretical issues if a profile response were to suddenly start sending outdated info but claiming it was recently minted.

This is maybe overkill but none of them seem unsafe. I'm still not sure it'll fix whatever people are seeing - my leading theory is that Bungie has re-issued some items from Into The Light with new item IDs, and this wouldn't really fix that since those would actually be new IDs.

While I was in there I also clarified the logging around how profiles are loaded, to make more sense out of it when people send logs screenshots.