Skip to content
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

Replace django get_random_secret_key with secrets.token_hex #478

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

smartspot2
Copy link
Member

With prior dependency changes, we no longer install psycopg onto users' computers, but the get_random_secret_key function used in setup.sh requires Django to be fully set up prior to calling the function. As such, the function errors due to the missing dependency.

Since the secret key generated here is only going to be used for development, we can simply replace it with a more straightforward secrets.token_hex(32), despite its much lesser security.

@smartspot2 smartspot2 added the bug Something isn't working label Jul 26, 2024
@smartspot2 smartspot2 self-assigned this Jul 26, 2024
Copy link

cypress bot commented Jul 26, 2024

csm_web    Run #357

Run Properties:  status check passed Passed #357  •  git commit f1e211925d: Replace django get_random_secret_key with secrets.token_hex
Project csm_web
Branch Review fix/setup-secret-key
Run status status check passed Passed #357
Run duration 02m 26s
Commit git commit f1e211925d: Replace django get_random_secret_key with secrets.token_hex
Committer Alec Li
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 78
View all changes introduced in this branch ↗︎

@smartspot2 smartspot2 merged commit 274a306 into master Sep 11, 2024
16 checks passed
@smartspot2 smartspot2 deleted the fix/setup-secret-key branch September 11, 2024 05:11
@smartspot2
Copy link
Member Author

Merged the PR without review since it's just a development setup change :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant