[etherpad-web/oscp-frontend] Avoid possible pad naming collisions
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [etherpad-web/oscp-frontend] Avoid possible pad naming collisions
- Date: Thu, 14 Mar 2019 18:17:25 +0000 (UTC)
commit 5b5d6e1d642b859bd4873fdcac67f4e1e21d733b
Author: Andrea Veri <averi redhat com>
Date: Thu Mar 14 19:17:11 2019 +0100
Avoid possible pad naming collisions
app_data/httpd-pre-init/set-htaccess-passwords.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app_data/httpd-pre-init/set-htaccess-passwords.sh
b/app_data/httpd-pre-init/set-htaccess-passwords.sh
index 1b8c731..548bc26 100755
--- a/app_data/httpd-pre-init/set-htaccess-passwords.sh
+++ b/app_data/httpd-pre-init/set-htaccess-passwords.sh
@@ -5,8 +5,8 @@ PROTECTED_PADS=('adboard' 'board' 'codeofconduct' 'edsearch' 'marketing' 'releas
for pad_name in "${PROTECTED_PADS[@]}"; do
echo "${pad_name}:${pad_name}_to_replace" > $APP_ROOT/$pad_name.htaccess
- if [[ `env | grep ^$pad_name | grep SECRET | cut -d'=' -f1 | cut -d'_' -f1` == "$pad_name" ]]; then
- secret=`env | grep ^$pad_name | grep SECRET | cut -d'=' -f2`
+ if [[ `env | grep "^${pad_name}_SECRET" | cut -d'=' -f1 | cut -d'_' -f1` == "$pad_name" ]]; then
+ secret=`env | grep "^${pad_name}_SECRET" | cut -d'=' -f2`
sed -i "s|${pad_name}_to_replace|${secret}|" $APP_ROOT/$pad_name.htaccess
fi
done
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]