Skip to content

Conversation

tomasMizera
Copy link
Contributor

Access tokens do not need to start with .. If the payload is not big enough, data do not get compressed and the dot is not prepended. See https://github.com/pallets/itsdangerous/blob/main/src/itsdangerous/url_safe.py#L55

The fix is to make the decode_token_data method accept tokens that do not start with dot and apply zlib.decompress only for tokens that are compressed.

@tomasMizera tomasMizera requested a review from varmar05 August 26, 2025 08:46
@tomasMizera tomasMizera force-pushed the hotfix-access-token-structure branch from 23d5d18 to 5bf360a Compare August 26, 2025 08:47
@coveralls
Copy link

Pull Request Test Coverage Report for Build 17232971781

Details

  • 28 of 28 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 80.544%

Totals Coverage Status
Change from base Build 17072055656: 0.09%
Covered Lines: 3523
Relevant Lines: 4374

💛 - Coveralls

@varmar05 varmar05 merged commit 0abb102 into master Aug 26, 2025
4 checks passed
@MarcelGeo MarcelGeo deleted the hotfix-access-token-structure branch September 4, 2025 09:04
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.

4 participants