-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Upgrade Django to 4.2.x #1538
Conversation
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
433857 | Triggered | Generic Password | 80feb61 | authentication/pipeline/user_test.py | View secret |
433857 | Triggered | Generic Password | 80feb61 | authentication/pipeline/user_test.py | View secret |
433857 | Triggered | Generic Password | 80feb61 | authentication/pipeline/user_test.py | View secret |
433857 | Triggered | Generic Password | 80feb61 | authentication/pipeline/user_test.py | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
bc227fe
to
6eecfe3
Compare
1f61471
to
ed3e83f
Compare
5d695b1
to
ea89db3
Compare
f96dd04
to
7171305
Compare
6f5bc29
to
e314fc4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just a couple of minor things.
I have noticed an exception that does not impact any functionality. It exists on the current master.
Simply go to the CMS Dashboard, you will see an exception in local logs.
Will look like:
Traceback (most recent call last):
web-1 | File "/opt/venv/lib/python3.10/site-packages/django/template/base.py", line 886, in _resolve_lookup
web-1 | if isinstance(current, BaseContext) and getattr(
web-1 | AttributeError: type object 'Context' has no attribute 'header_controls'
web-1 |
web-1 | During handling of the above exception, another exception occurred:
web-1 |
web-1 | Traceback (most recent call last):
web-1 | File "/opt/venv/lib/python3.10/site-packages/django/template/base.py", line 896, in _resolve_lookup
web-1 | current = current[int(bit)]
web-1 | ValueError: invalid literal for int() with base 10: 'header_controls'
web-1 |
web-1 | During handling of the above exception, another exception occurred:
web-1 |
web-1 | Traceback (most recent call last):
web-1 | File "/opt/venv/lib/python3.10/site-packages/django/template/base.py", line 903, in _resolve_lookup
web-1 | raise VariableDoesNotExist(
ecommerce/urls.py
Outdated
from django.urls import re_path | ||
from django.urls import path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from django.urls import re_path | |
from django.urls import path | |
from django.urls import path, re_path |
main/hijack_support_middleware.py
Outdated
|
||
This middleware is written to ensure that the request session has accessed=True when the request reaches HijackMiddleware. | ||
|
||
We will probably need to add a more robust solution to django-hijack package.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will probably need to add a more robust solution to django-hijack package.""" | |
We will probably need to add a more robust solution to django-hijack package. | |
""" |
main/hijack_support_middleware.py
Outdated
HijackMiddleware needs the session to be in accessed state in order to work properly. | ||
However, It doesn't work properly with our current architecture and django-hijack implementation | ||
because when the request reaches HijackMiddleware the session is not in accessed state. | ||
|
||
This middleware is written to ensure that the request session has accessed=True when the request reaches HijackMiddleware. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we mention that the issue was with the notification injection? I believe that was the only issue?
@@ -75,9 +74,9 @@ | |||
name="wagtailimages_serve", | |||
), | |||
re_path(r"^cms/login", cms_login_redirect_view, name="wagtailadmin_login"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can also be a simple path like below paths.
e314fc4
to
80feb61
Compare
a52576d
to
e3d57aa
Compare
What are the relevant tickets?
#1467, https://github.com/mitodl/hq/issues/3747
What's this PR do?
postgres, django-hijack, oauth-toolkit, celery, celery-redbeat, django-robots, djangorestframework
pytz
package becausepytz
has been deprecated and Its support would be removed in Django 5.x.ol-django
NOTE:
How should this be manually tested?
configure_cms & seed_data
)set_appication_state
you can also use this command in testing for setting application state from initial to completion and inbetweenWhere should the reviewer start?
Setup a good amount of data on the
master
branch before moving to this branch. You should have users, profiles, applications, application steps etc.What GIF best describes this PR or how it makes you feel?