scragg0x / realms-wiki

Git based wiki inspired by Gollum
http://realms.io
GNU General Public License v2.0
831 stars 90 forks source link

Properly escape REALMS_WIKI_CONFIG variable #115

Closed knovoselic closed 8 years ago

knovoselic commented 8 years ago

There's a bug in realms-wiki.sh which prevents the docker image from starting correctly if REALMS_WIKI_CONFIG variable contains spaces (e.g. site title could contains spaces).

waja commented 8 years ago

Is there anything keeping this not merged? I can reproduce the issue here, without the quotes it breaks with Config value should be valid JSON.

scragg0x commented 8 years ago

It's fine. At first I was wondering if single quotes would be better to prevent interpolation if that was even possible in a bash variable. I was over thinking it.

knovoselic commented 8 years ago

@scragg0x You can't use single quotes as in that case the variable won't get expanded. And as far as I know, bash won't recursively expand string.

scragg0x commented 8 years ago

@knovoselic Ok, thanks for clearing that up for me.