From: Christian Heller Date: Thu, 13 Dec 2018 21:25:36 +0000 (+0100) Subject: Use clear password files for HTTP basic auth on IRC logs. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/edit?a=commitdiff_plain;h=7f8ab8cff7b311ce7a8d6fa2e3979e56c29a2a7a;p=config Use clear password files for HTTP basic auth on IRC logs. --- diff --git a/all_new_2018/setup_plomlombot.sh b/all_new_2018/setup_plomlombot.sh index 4562588..fa8eab2 100755 --- a/all_new_2018/setup_plomlombot.sh +++ b/all_new_2018/setup_plomlombot.sh @@ -13,7 +13,7 @@ irclogs_dir=/var/www/html/irclogs irclogs_pw_dir=/var/www/irclogs_pw cp "${config_tree_prefix}"/user_scripts/plomlombot_daemon.sh /home/plom/ chown plom:plom /home/plom/plomlombot_daemon.sh -apt -y install screen python3-venv gpg dirmngr apache2-utils +apt -y install screen python3-venv gpg dirmngr su plom -c "gpg --recv-key ${gpg_key}" # TODO: After this, we could in theory remove dirmngr if we only installed it just now. su plom -c "cd && git clone /var/public_repos/plomlombot-irc" diff --git a/all_new_2018/user_scripts/plomlombot_daemon.sh b/all_new_2018/user_scripts/plomlombot_daemon.sh index df4f49d..b7054e1 100755 --- a/all_new_2018/user_scripts/plomlombot_daemon.sh +++ b/all_new_2018/user_scripts/plomlombot_daemon.sh @@ -39,7 +39,7 @@ while true; do # FIXME: Note the trouble we will have if we have the same channel # name on different servers … ln -sfn "${logs_dir}" "${irclogs_dir}/${shortened_channel_name}" - htpasswd -c "${irclogs_pw_dir}/${shortened_channel_name}" "${login_user}" "${login_pw}" + echo "${login_user}":'{PLAIN}'"${login_pw}" > "${irclogs_pw_dir}/${shortened_channel_name}" # If "key:" line, encrypt old raw logs to that GPG key. elif [ "${first_word}" = "gpg_key": ]; then