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

Docker: Database passwords with two exclamation points create invalid config.yml #2293

Closed
axisofentropy opened this issue Aug 13, 2020 · 4 comments
Assignees
Labels
bug Something isn't working contrib-easy Easy dev difficulty for contribution

Comments

@axisofentropy
Copy link
Contributor

Describe the bug
The wiki.js container image doesn't seem to tolerate database passwords that have two exclamation points. It seems to generate a config.yml file that is not valid YAML. Here's an example error message:

undeclared tag handle "!rE!" at line 8, column 25:
      pass: !rE!z-pzjvFKuVOu
                            ^
>>> Unable to read configuration file! Did you create the config.yml file?

To Reproduce

  1. Start a Docker container using the requarks/wiki image and specifying the environment variable DB_PASS with value that includes two exclamation points. You may or may not need to specify other database connection environment variables.
  2. Observe error in container logs.

Expected behavior
I expected the container to establish a database connection after constructing a valid config.yml file.

Host Info (please complete the following information):

  • OS: Google Kubernetes Engine, Rapid Release Channel, probably 1.17.8-gke.17
  • Wiki.js version: Probably Docker tag canary-2.5.90
  • Database engine: Postgres 9 or 11, not sure

Additional context
Maybe just putting quotes around this value (and all others from environment variables!) within the YAML would fix this?

@Smankusors
Copy link

Maybe just putting quotes around this value (and all others from environment variables!) within the YAML would fix this?

You... haven't tried this?

@NGPixel
Copy link
Member

NGPixel commented Aug 13, 2020

You... haven't tried this?

He mentioned Docker env, which is set internally.

@NGPixel NGPixel added bug Something isn't working contrib-easy Easy dev difficulty for contribution labels Aug 13, 2020
@ptts
Copy link

ptts commented Aug 14, 2020

I'm pretty sure the issue is the leading ! and not the fact that it contains two !. Take a look at the YAML specification about node tags. Either quoting the password or not leading with an ! should work.

@NGPixel
Copy link
Member

NGPixel commented Aug 15, 2020

Fixed by 29afc61

@NGPixel NGPixel closed this as completed Aug 15, 2020
jionggyu pushed a commit to jionggyu/wiki-2.5.302-patch that referenced this issue Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working contrib-easy Easy dev difficulty for contribution
Projects
None yet
Development

No branches or pull requests

4 participants