adamzammit / limesurvey-docker

Production ready dockerised Limesurvey
GNU General Public License v3.0
86 stars 51 forks source link

entrypoint script error set_config #22

Closed bpinsard closed 3 years ago

bpinsard commented 3 years ago

Running container 3.27.7 in docker-swarm with secrets I get the following error and the service crashes:

sed: -e expression #1, char 48: unknown option to `s'

Is it possible that a special character used in any of the values set in the config file would make the following line crash?

https://github.com/adamzammit/limesurvey-docker/blob/12e5fd33ef1c674fe6826a19fcde733daa47800a/docker-entrypoint.sh#L87

Thanks!

bpinsard commented 3 years ago

My secret contains a / character, which is a possibility when generating secrets with openssl rand -base64 20 such as suggested in docker examples. A simple fix would be to replace the slash by pipes in the line above, eg.:

 sed -i "'$key'/s|>\(.*\)|>$value,|1"  application/config/config.php