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

Database backups fail when special characters exist in the password #4115

Closed
jeffers102 opened this issue Apr 9, 2019 · 1 comment
Closed

Comments

@jeffers102
Copy link

Description

I am using RHEL7, with Postgres 11.2. Accessing the CMS/website works great and there are no database issues. However, whenever a database back-up is performed, it fails, with a misleading error stating that the user can not be authenticated with Postgres. Evidently, it was because my database user's password contained a "$" symbol. This is escaped properly when performing queries as user's browse the site, however, it is not performed when executing the "PGPASSWORD="<password" pg_dump....." command. There may be other special characters that would result in the same error and I am not sure if MySQL would have similar problems. For me, I just changed the "$" to a "*" and everything works great. Keep up the great work, I'm loving Craft!

Steps to reproduce

  1. Setup an instance of Craft CMS with Postgres.
  2. Give the database user a password that contains a "$" symbol.
  3. Attempt to back-up the database.

Additional info

  • Craft version: 3.1.21.1
  • PHP version: 7.3.4
  • Database driver & version: PostgreSQL 11.2
@brandonkelly
Copy link
Member

This should be fixed for the next release.

To get the fix early, change your craftcms/cms requirement in composer.json to:

"require": {
  "craftcms/cms": "dev-develop#d2f008c287b922123b02ee4dbb0d4ee535a45d12 as 3.1.21.1",
  "...": "..."
}

Then run composer update.

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

No branches or pull requests

2 participants