Wiki: Docker: Database passwords with two exclamation points create invalid `config.yml`

Created on 13 Aug 2020  路  4Comments  路  Source: Requarks/wiki

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?

bug contrib-easy

Most helpful comment

Fixed by 29afc61abf6fbd6d09886ac7952b2e78c98633be

All 4 comments

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

You... haven't tried this?

You... haven't tried this?

He mentioned Docker env, which is set internally.

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.

Fixed by 29afc61abf6fbd6d09886ac7952b2e78c98633be

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LionNatsu picture LionNatsu  路  3Comments

ccolella-mdc picture ccolella-mdc  路  3Comments

den1622 picture den1622  路  3Comments

ccolella-mdc picture ccolella-mdc  路  3Comments

ghost picture ghost  路  3Comments