Skip to content

Conversation

@spencerckhuang
Copy link
Collaborator

@spencerckhuang spencerckhuang commented Nov 5, 2025

📝 Summary

Django upgrade to v4+ causes some CSRF-related issues resulting in calls to backend getting access denied. Updated certian settings files appropriately. Also restores old docker-compose.yml, fixes linter error, and fixes logout issue due to depreciated Django view.

🔍 Change Log

  • semesterly/settings.py: added CSRF_TRUSTED_ORIGINS
  • static/js/redux/ui/modals/UserSettingsModal.tsx: updates from link-click to a POST request. a clicked link results in a GET request to the LogoutView, which is depreciated in Django v5+
  • student/views.py: makes custom logout view in accordance with LogoutView depreciation. see docs for updated instructions
  • student/urls.py: updates url with new logout view
  • docker-compose.yml: restores certain parts of this file to match previous docker-compose in develop
  • static/js/redux/ui/modals/UserSettingsModal.tsx: runs prettier

⚠️ Base Testing

Please fill in the following required testing steps with a checkbox (✅) before making this PR, or indicate why they are not necessary for this change:

[✅] docker-compose build && docker-compose up and the https://jhu.sem.ly endpoint works successfully

[✅] Semesterly CI successful

[✅] Backend linter successful

[✅] TSLint successful

💻 Local Testing Instructions

  • Verify that logging out does not result in a 403 error
  • Successfully upload transcript to course history feature without getting "file not uploaded" error

To test locally from a forked repo, run:

git fetch https://github.com/<username>/<fork-repo>.git <branch-name>:pr-<PR_NUMBER> && git checkout pr-<PR_NUMBER>

Please contact the owner of the fork in case the fork's branches are not publically accessible.

@spencerckhuang spencerckhuang changed the title Fixes CSRF-related bugs Fixes several bugs Nov 5, 2025
@valerieliang valerieliang merged commit 90b99ef into jhuopensource:develop Nov 16, 2025
3 checks passed
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.

2 participants