Skip to content
/ django Public

Deleted leaking loop iter vars in smartif.py.#20760

Merged
jacobtylerwalls merged 1 commit intodjango:mainfrom
sobolevn:patch-7
Feb 24, 2026
Merged

Deleted leaking loop iter vars in smartif.py.#20760
jacobtylerwalls merged 1 commit intodjango:mainfrom
sobolevn:patch-7

Conversation

@sobolevn
Copy link
Contributor

Trac ticket number

None, trivial change

Branch description

While working on https://github.com/typeddjango/django-stubs/pull/3114/changes#diff-c408a224a641ee1ad26789d61b19c64c44667c1feb8fce0d58aea0338844ca66R276-R278 we have noticed that loop variables leak into the module namespace.

It has two negative effects:

  1. Users can access smartif.op and smartif.key public attrs, which is clearly not intenteded
  2. We in django-stubs have to ignore these two objects from annotations

Let's remove them :)

AI Assistance Disclosure (REQUIRED)

  • No AI tools were used in preparing this PR.
  • If AI tools were used, I have disclosed which ones, and fully reviewed and verified their output.

Checklist

  • This PR follows the contribution guidelines.
  • This PR does not disclose a security vulnerability (see vulnerability reporting).
  • This PR targets the main branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.
  • I have checked the "Has patch" ticket flag in the Trac system.
  • I have added or updated relevant tests.
  • I have added or updated relevant docs, including release notes if applicable.
  • I have attached screenshots in both light and dark modes for any UI changes.

While working on https://github.com/typeddjango/django-stubs/pull/3114/changes#diff-c408a224a641ee1ad26789d61b19c64c44667c1feb8fce0d58aea0338844ca66R276-R278 we have noticed that loop variables leak into the module namespace.

It has two negative effects:
1. Users can access `smartif.op` and `smartif.key` public attrs, which is clearly not intenteded
2. We in `django-stubs` have to ignore these two objects from annotations

Let's remove them :)
@github-actions github-actions bot added the no ticket Based on PR title, no linked Trac ticket label Feb 24, 2026
@jacobtylerwalls jacobtylerwalls merged commit 2de474d into django:main Feb 24, 2026
38 of 42 checks passed
MysticEntity-dev pushed a commit to MysticEntity-dev/djangodev that referenced this pull request Feb 24, 2026
…d_wsgi auth handler.

Refs CVE-2024-39329, django#20760.

Thanks Stackered for the report, and Jacob Walls and Markus Holtermann
for the reviews.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
nessita pushed a commit to nessita/django that referenced this pull request Feb 24, 2026
…() in mod_wsgi auth handler.

Refs CVE-2024-39329, django#20760.

Thanks Stackered for the report, and Jacob Walls and Markus Holtermann
for the reviews.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>

Backport of 3eb814e from main.
nessita pushed a commit to nessita/django that referenced this pull request Mar 2, 2026
…() in mod_wsgi auth handler.

Refs CVE-2024-39329, django#20760.

Thanks Stackered for the report, and Jacob Walls and Markus Holtermann
for the reviews.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>

Backport of 3eb814e from main.
craigds pushed a commit to koordinates/django that referenced this pull request Mar 5, 2026
…() in mod_wsgi auth handler.

Refs CVE-2024-39329, django#20760.

Thanks Stackered for the report, and Jacob Walls and Markus Holtermann
for the reviews.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>

Backport of 3eb814e from main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no ticket Based on PR title, no linked Trac ticket

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants