Skip to content

Commit

Permalink
awk sk can have a slash, so use sed with | separator.
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasCARPi committed Jul 12, 2023
1 parent d9a968e commit 79f9127
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# 4.4.1

* Fix issue with AWS Secret Key containing a slash (fix elabftw/elabftw#4471)
* Fix `set_real_ip` nginx module not working with CIDR notation

# 4.4.0
Expand Down
4 changes: 2 additions & 2 deletions src/init/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ populatePhpEnv() {
sed -i -e "s#%SITE_URL%#${site_url}#" /etc/php81/php-fpm.d/elabpool.conf
# assume that if ak is set, then sk is too
if [ -n "$aws_ak" ]; then
sed -i -e "s/%ELAB_AWS_ACCESS_KEY%/${aws_ak}/" /etc/php81/php-fpm.d/elabpool.conf
sed -i -e "s/%ELAB_AWS_SECRET_KEY%/${aws_sk}/" /etc/php81/php-fpm.d/elabpool.conf
sed -i -e "s|%ELAB_AWS_ACCESS_KEY%|${aws_ak}|" /etc/php81/php-fpm.d/elabpool.conf
sed -i -e "s|%ELAB_AWS_SECRET_KEY%|${aws_sk}|" /etc/php81/php-fpm.d/elabpool.conf
else
sed -i -e "/%ELAB_AWS_ACCESS_KEY%/d" /etc/php81/php-fpm.d/elabpool.conf
sed -i -e "/%ELAB_AWS_SECRET_KEY%/d" /etc/php81/php-fpm.d/elabpool.conf
Expand Down

0 comments on commit 79f9127

Please sign in to comment.