Skip to content

fix(social-auth): Copy extra argument settings before modifying them - #127797

Closed
joshuarli wants to merge 1 commit into
masterfrom
fix/social-auth-extra-arguments
Closed

joshuarli wants to merge 1 commit into
masterfrom
fix/social-auth-extra-arguments

Conversation

@joshuarli

Copy link
Copy Markdown
Member

auth_extra_arguments and request_token_extra_arguments returned the dict stored in Django settings (<BACKEND>_AUTH_EXTRA_ARGUMENTS, <BACKEND>_REQUEST_TOKEN_EXTRA_ARGUMENTS). auth_extra_arguments overwrote its values with request GET/POST parameters, and callers add scope and token parameters to the returned dict, so a value from one request was seen by later requests in the same process. Both now return a copy.

Only deployments that define one of these settings are affected; none is set by default.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 16, 2026
@getsantry

getsantry Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry Bot added the Stale label Nov 7, 2026
auth_extra_arguments and request_token_extra_arguments returned the dict stored in Django settings. auth_extra_arguments wrote request GET/POST values into it, and callers add scope and token parameters to the returned dict, so later requests in the same process saw values from earlier ones. Return a copy instead.
@joshuarli

Copy link
Copy Markdown
Member Author

Consolidated into #130967 as part of the typing campaign cleanup; code unchanged from the individually validated draft. Tracked in #130956.

@joshuarli joshuarli closed this Nov 12, 2026
joshuarli added a commit that referenced this pull request Nov 26, 2026
Consolidates the previously separate drafts #127797 and #127812 into one
review unit; the code is unchanged from those individually validated drafts.

- social auth copies the request-token and auth extra-argument settings
  before mutating them with request data
- oauth2 decodes form-encoded token response bodies before parsing form
  values

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

Labels

GitHub Team: python-typing Scope: Backend Automatically applied to PRs that change backend components Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant