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

fix(migrations): encode input to ensure valid postgres urls #6123

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Intellicode
Copy link

Background

When passwords (or other parameters) contain special characters (such as % in a password), it will result in invalid postgres url's

Description

The change encodes all injected input parameters, I can remove some if you think its unnecessary.

Checklist

  • Input validation
  • Output encoding
  • Authentication management
  • Session management
  • Access control
  • Cryptographic practices
  • Error handling and logging
  • Data protection
  • Communication security
  • System configuration
  • Database security
  • File management
  • Memory management
  • Testing

@n1ru4l n1ru4l self-requested a review December 16, 2024 10:31
Copy link
Contributor

@n1ru4l n1ru4l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Intellicode, thank you for this contribution. There are currently multiple createConnectionString copies within our code base e.g.

packages/services/storage/src/db/utils.ts
packages/migrations/src/connection-string.ts

Could you adjust all of them to use the same function definition with your improvements?

Also could you please add a changeset for hive using the command pnpm changeset, for describing this improvement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants