fix: do not leak pg password to command line#560
Merged
Conversation
Contributor
Author
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #560 +/- ##
==========================================
+ Coverage 91.40% 91.52% +0.11%
==========================================
Files 19 19
Lines 873 932 +59
Branches 157 161 +4
==========================================
+ Hits 798 853 +55
- Misses 40 43 +3
- Partials 35 36 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Owner
|
There appears to be a draft PR that is related: #385 Can you voice your opinion on this other implementation? |
Contributor
Author
|
Looks like it'd probably be fine but I haven't tried/tested it. imo advantages of this PR are:
|
Archmonger
requested changes
Jun 11, 2025
Archmonger
left a comment
Owner
There was a problem hiding this comment.
Can be merged after adding a changelog entry.
Archmonger
approved these changes
Jun 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Ensure that postgresql password is not included in command line params and is instead passed via the
PGPASSWORDenv var.Notes
settings.ADMINSincluded the full database passworddjango.db.backends.postgresql.client.DatabaseClient.settings_to_cmd_args_envbut it generates params that are not compatible withpg_restoreChecklist
Please update this checklist as you complete each item:
By submitting this pull request I agree that all contributions comply with this project's open source license(s).