From 3d3738f500cf3bdaf678eb62db97b03f90bd9fa4 Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Wed, 7 Apr 2021 10:06:33 +0000 Subject: [PATCH] 2.4.46-debian-10-r219 release --- bitnami/apache/2.4/debian-10/Dockerfile | 2 +- .../rootfs/opt/bitnami/scripts/libapache.sh | 20 +++++++++++++++++++ bitnami/apache/README.md | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/bitnami/apache/2.4/debian-10/Dockerfile b/bitnami/apache/2.4/debian-10/Dockerfile index 5a3e05c191d7..879cc4dda1c9 100644 --- a/bitnami/apache/2.4/debian-10/Dockerfile +++ b/bitnami/apache/2.4/debian-10/Dockerfile @@ -20,7 +20,7 @@ ENV APACHE_ENABLE_CUSTOM_PORTS="no" \ APACHE_HTTPS_PORT_NUMBER="" \ APACHE_HTTP_PORT_NUMBER="" \ BITNAMI_APP_NAME="apache" \ - BITNAMI_IMAGE_VERSION="2.4.46-debian-10-r218" \ + BITNAMI_IMAGE_VERSION="2.4.46-debian-10-r219" \ PATH="/opt/bitnami/common/bin:/opt/bitnami/apache/bin:$PATH" EXPOSE 8080 8443 diff --git a/bitnami/apache/2.4/debian-10/rootfs/opt/bitnami/scripts/libapache.sh b/bitnami/apache/2.4/debian-10/rootfs/opt/bitnami/scripts/libapache.sh index ff262cb594a7..115d0f720e51 100644 --- a/bitnami/apache/2.4/debian-10/rootfs/opt/bitnami/scripts/libapache.sh +++ b/bitnami/apache/2.4/debian-10/rootfs/opt/bitnami/scripts/libapache.sh @@ -685,3 +685,23 @@ apache_update_app_configuration() { fi fi } + +######################## +# Create a password file for basic authentication and restrict its permissions +# Globals: +# * +# Arguments: +# $1 - file +# $2 - username +# $3 - password +# Returns: +# true if the configuration was updated, false otherwise +######################## +apache_create_password_file() { + local -r file="${1:?missing file}" + local -r username="${2:?missing username}" + local -r password="${3:?missing password}" + + "${APACHE_BIN_DIR}/htpasswd" -bc "$file" "$username" "$password" + am_i_root && configure_permissions_ownership "$file" --file-mode "600" --user "$APACHE_DAEMON_USER" --group "$APACHE_DAEMON_GROUP" +} diff --git a/bitnami/apache/README.md b/bitnami/apache/README.md index 28feb677186d..bb02ce796949 100644 --- a/bitnami/apache/README.md +++ b/bitnami/apache/README.md @@ -45,7 +45,7 @@ Non-root container images add an extra layer of security and are generally recom Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/tutorials/understand-rolling-tags-containers/). -* [`2.4`, `2.4-debian-10`, `2.4.46`, `2.4.46-debian-10-r218`, `latest` (2.4/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-apache/blob/2.4.46-debian-10-r218/2.4/debian-10/Dockerfile) +* [`2.4`, `2.4-debian-10`, `2.4.46`, `2.4.46-debian-10-r219`, `latest` (2.4/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-apache/blob/2.4.46-debian-10-r219/2.4/debian-10/Dockerfile) Subscribe to project updates by watching the [bitnami/apache GitHub repo](https://github.com/bitnami/bitnami-docker-apache).