fix: encode slashes in connection passwords - #14881
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughChangesThe connection string parsers now percent-encode all password characters. Unit tests verify slash encoding and hostname preservation in the backend test suite. Connection Password Encoding
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change consistently encodes slashes in connection passwords so they remain part of the password instead of being interpreted as URL path separators. No actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 8 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (8 passed)
Full details: Test Coverage For New ImplementationsExplanation The PR includes regression coverage for both changed parser implementations. Full details: Test Quality And CoverageExplanation PASS. The tests cover the changed behavior in both parser copies. The backend test checks the exact Full details: Test File Naming And StructureExplanation Both changed test files use the Full details: Excessive Mock Usage WarningExplanation PASS: The changed tests use no mocks, patches, fakes, stubs, or spies. They directly call ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ded4490 to
9b089ef
Compare
Problem
Passwords containing
/remain unescaped becauseurllib.parse.quotetreats slashes as safe by default. In a PostgreSQL URL, this moves the configured database host into the parsed path and prevents the connection from reaching it.Fix
Use an empty safe set in both connection-string parser copies so
/is encoded as%2F.Test plan
Summary by CodeRabbit