Skip to content

only keep known fields on imported shared loadouts - #11961

Open
dxbjavid wants to merge 1 commit into
DestinyItemManager:masterfrom
dxbjavid:shared-loadout-known-fields
Open

only keep known fields on imported shared loadouts#11961
dxbjavid wants to merge 1 commit into
DestinyItemManager:masterfrom
dxbjavid:shared-loadout-known-fields

Conversation

@dxbjavid

Copy link
Copy Markdown
Contributor

a shared loadout link is fully attacker-controlled json, and convertDimApiLoadoutToLoadout spreads every top-level key it carries straight into the loadout we store and later sync to dim sync, so a crafted ?loadout= link (or dim.gg share) can smuggle arbitrary unmodelled fields past the import boundary. preprocessReceivedLoadout only clamped the stat constraints, so it now rebuilds the received loadout from just the fields a loadout is allowed to have, reusing the same newLoadout construction the url-parameters path already uses. added a small test covering an injected extra key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant