Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref CSF-2340
Why
5.19.3 renewed the Steam store session to read the web API token from the store. On Firefox, the store can't refresh its own session after a steamcommunity.com login, since Firefox keeps the login cookie it needs out of the store's reach, so renewal fails there too.
What changed
The extension loads steamcommunity.com, which lets Steam refresh the login when needed, then reads the token from the
steamLoginSecurecookie. This adds thecookiespermission, which Chrome and Firefox don't warn about on update.Expired tokens are rejected by checking
expagainst theDateheader on Steam's response, since the user's clock can be off.The 5.19.3 store renewal and its header rules are removed. Firefox still removes the old rule IDs, since dynamic rules survive updates.
Tests
Cover reading the cookie after the page load, account mismatches, missing cookies, expired tokens and a drifted local clock.
Note
Medium Risk
Changes how auth tokens are obtained for trade pings and related features; misread or expired cookies could break Steam API calls until the user revisits Steam, but the flow is simpler and avoids brittle store renewal on Firefox.
Overview
Steam Web API tokens are no longer fetched via the store (
ajaxgetasyncconfig) or renewed throughjwt/ajaxrefresh/settoken. The extension now loadssteamcommunity.com(so Steam can refresh the session), reads the JWT from thesteamLoginSecurecookie via the newcookiespermission, and rejects tokens whoseexpis past Steam's time using the responseDateheader.Store-session renewal code,
LAST_STORE_SESSION_RENEWAL_ATTEMPT, and declarative-net-request rules that spoofed store headers for refresh/settoken are removed; Firefox dynamic rules still drop the old renewal rule IDs on update. Tests are rewritten around cookie reads and expiry checks instead of store renewal flows.Reviewed by Cursor Bugbot for commit 3688134. Bugbot is set up for automated code reviews on this repo. Configure here.