Skip to content

Mentally prepare for Django 5.2 upgrade#1507

Draft
sayravai wants to merge 1 commit intoapluslms:masterfrom
sayravai:Django5.2
Draft

Mentally prepare for Django 5.2 upgrade#1507
sayravai wants to merge 1 commit intoapluslms:masterfrom
sayravai:Django5.2

Conversation

@sayravai
Copy link
Copy Markdown
Contributor

@sayravai sayravai commented Mar 9, 2026

Description

Django 4.2 LTS support ends in April 2026, which is next month. We should upgrade all production Django projects to 5.2, so let's kick this off by this PR, which is essentially changes made by the django-upgrade script in the current a-plus repo.

Comment thread exercise/views.py

# Redirect back to the previous page
return redirect(request.META.get('HTTP_REFERER', '/'))
return redirect(request.headers.get('referer', '/'))

Check warning

Code scanning / CodeQL

URL redirection from remote source Medium

Untrusted URL redirection depends on a
user-provided value
.
Comment thread exercise/views.py

# Redirect back to the previous page
return redirect(request.META.get('HTTP_REFERER', '/'))
return redirect(request.headers.get('referer', '/'))

Check warning

Code scanning / CodeQL

URL redirection from remote source Medium

Untrusted URL redirection depends on a
user-provided value
.
Comment thread userprofile/views.py
pseudonymize = request.session.get("pseudonymize", False)
request.session["pseudonymize"] = not pseudonymize
return HttpResponseRedirect(request.META.get("HTTP_REFERER", "/"))
return HttpResponseRedirect(request.headers.get("referer", "/"))

Check warning

Code scanning / CodeQL

URL redirection from remote source Medium

Untrusted URL redirection depends on a
user-provided value
.
@sayravai sayravai moved this to In progress in A+ sprints Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants