Skip to content

Commit

Permalink
Release 5.2.3 - See CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tiredofit committed Jun 27, 2022
1 parent 26dca7a commit 5b1bf5c
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 20 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 5.2.3 2022-06-27 <dave at tiredofit dot ca>

### Changed
- Bug fix to 5.2.2


## 5.2.2 2022-06-23 <dave at tiredofit dot ca>

### Added
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LABEL maintainer="Dave Conroy (dave at tiredofit dot ca)"
ENV SSP_VERSION=1.3 \
PHP_ENABLE_LDAP=TRUE \
PHP_ENABLE_CREATE_SAMPLE_PHP=FALSE \
NGINX_SITES_ENABLED=ssp \
NGINX_SITE_ENABLED=ssp \
NGINX_WEBROOT="/www/ssp" \
IMAGE_NAME="tiredofit/self-service-password" \
IMAGE_REPO_URL="https://github.com/tiredofit/docker-self-service-password/"
Expand Down
32 changes: 16 additions & 16 deletions install/etc/cont-init.d/30-self-service-password
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [ ! -f "${NGINX_WEBROOT}"/index.php ] ; then
fi

## Determine if we want to autoconfigure
if [ "$SETUP_TYPE" = "AUTO" ]; then
if [ "${SETUP_TYPE,,}" = "auto" ]; then
print_warn "Autoconfiguring Settings based on defaults and evnironment variables"

## Remove Comments on Default Config File
Expand All @@ -34,24 +34,24 @@ if [ "$SETUP_TYPE" = "AUTO" ]; then

## Active Directory
update_config_noquote ad_mode "$ADMODE"
sed -i "s#\$ad_options\['force_unlock'\].*#\$ad_options['force_unlock'] = ${AD_OPT_FORCE_UNLOCK};#g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s#\$ad_options\['force_pwd_change'\].*#\$ad_options['force_pwd_changeunlock'] = ${AD_OPT_FORCE_PWD_CHANGE};#g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s#\$ad_options\['change_expired_password'\].*#\$ad_options['change_expired_password'] = ${AD_OPT_CHANGE_EXPIRED_PASSWORD};#g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s|\$ad_options\['force_unlock'\].*|\$ad_options['force_unlock'] = ${AD_OPT_FORCE_UNLOCK};|g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s|\$ad_options\['force_pwd_change'\].*|\$ad_options['force_pwd_changeunlock'] = ${AD_OPT_FORCE_PWD_CHANGE};|g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s|\$ad_options\['change_expired_password'\].*|\$ad_options['change_expired_password'] = ${AD_OPT_CHANGE_EXPIRED_PASSWORD};|g" "${NGINX_WEBROOT}"/conf/config.inc.php

## Samba
update_config_noquote samba_mode "${SAMBA_MODE}"
sed -i "s#\$samba_options\['min_age'\].*#\$samba_options['min_age'] = ${SAMBA_MIN_AGE};#g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s#\$samba_options\['max_age'\].*#\$samba_options['max_age'] = ${SAMBA_MAX_AGE};#g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s#\$samba_options\['expire_days'\].*#\$samba_options\['expire_days'\] = ${SAMBA_EXPIRE_DAYS};#g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s|\$samba_options\['min_age'\].*|\$samba_options['min_age'] = ${SAMBA_MIN_AGE};|g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s|\$samba_options\['max_age'\].*|\$samba_options['max_age'] = ${SAMBA_MAX_AGE};|g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s|\$samba_options\['expire_days'\].*|\$samba_options\['expire_days'\] = ${SAMBA_EXPIRE_DAYS};|g" "${NGINX_WEBROOT}"/conf/config.inc.php

## Shadow Options
sed -i "s#\$shadow_options\['update_shadowLastChange'\].*#\$shadow_options['update_shadowLastChange'] = ${SHADOW_OPT_UPDATE_SHADOWLASTCHANGE};#g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s#\$shadow_options\['update_shadowExpire'\].*#\$shadow_options['update_shadowExpire'] = ${SHADOW_OPT_UPDATE_SHADOWEXPIRE};#g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s|\$shadow_options\['update_shadowLastChange'\].*|\$shadow_options['update_shadowLastChange'] = ${SHADOW_OPT_UPDATE_SHADOWLASTCHANGE};|g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s|\$shadow_options\['update_shadowExpire'\].*|\$shadow_options['update_shadowExpire'] = ${SHADOW_OPT_UPDATE_SHADOWEXPIRE};|g" "${NGINX_WEBROOT}"/conf/config.inc.php

## Hash
sed -i "s#\$hash_options\['crypt_salt_prefix'\].*#\$hash_options\['crypt_salt_prefix'\] = \"${PASSWORD_HASH_CRYPT_SALT_PREFIX}\";#g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s#\$hash_options\['crypt_salt_length'\].*#\$hash_options\['crypt_salt_length'\] = ${PASSWORD_HASH_CRYPT_SALT_LENGTH};#g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s#\$hash = .*#\$hash = \"${PASSWORD_HASH}\";#g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s|\$hash_options\['crypt_salt_prefix'\].*|\$hash_options\['crypt_salt_prefix'\] = \"${PASSWORD_HASH_CRYPT_SALT_PREFIX}\";|g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s|\$hash_options\['crypt_salt_length'\].*|\$hash_options\['crypt_salt_length'\] = ${PASSWORD_HASH_CRYPT_SALT_LENGTH};|g" "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i "s|\$hash = .*|\$hash = \"${PASSWORD_HASH}\";|g" "${NGINX_WEBROOT}"/conf/config.inc.php

## Local Password Policy
update_config_noquote pwd_min_length "${PASSWORD_MIN_LENGTH}"
Expand Down Expand Up @@ -140,10 +140,10 @@ if [ "$SETUP_TYPE" = "AUTO" ]; then
update_config background_image "${BACKGROUND_IMAGE}"

## Logging
if var_true "$ENABLE_RESET_LOG" ; then
sed -i 's/#\$reset_request_logurl = /\$reset_request_log = /g' "${NGINX_WEBROOT}"/conf/config.inc.php
if var_true "${ENABLE_RESET_LOG}" ; then
sed -i 's|#\$reset_request_logurl = |\$reset_request_log = |g' "${NGINX_WEBROOT}"/conf/config.inc.php
fi
update_config reset_request_log "${LOG_LOCATION}""${LOG_RESET}"
update_config reset_request_log "${LOG_LOCATION}" "${LOG_RESET}"

## CAPTCHA
update_config_noquote use_recaptcha "${USE_RECAPTCHA}"
Expand All @@ -159,7 +159,7 @@ if [ "$SETUP_TYPE" = "AUTO" ]; then

## Reverse proxy Setup
if [ "$IS_BEHIND_PROXY" = "true" ]; then
sed -i 's/#\$reset_url = /\$reset_url = /g' "${NGINX_WEBROOT}"/conf/config.inc.php
sed -i 's|#\$reset_url = |\$reset_url = |g' "${NGINX_WEBROOT}"/conf/config.inc.php
if [ -n "${SITE_URL}" ]; then
update_config reset_url "${SITE_URL}"
fi
Expand Down
6 changes: 3 additions & 3 deletions install/etc/nginx/sites.available/ssp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}

location ~ \.php(/|$) {
include /etc/nginx/nginx.conf.d/php-fpm.conf;
include /etc/nginx/snippets/php-fpm.conf;
fastcgi_split_path_info ^(.+?\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_index index.php;
Expand All @@ -17,6 +17,6 @@
}

### Don't edit past here
include /etc/nginx/nginx.conf.d/site_optimization.conf;
include /etc/nginx/nginx.conf.d/exploit_protection.conf;
include /etc/nginx/snippets/site_optimization.conf;
include /etc/nginx/snippets/exploit_protection.conf;
}

0 comments on commit 5b1bf5c

Please sign in to comment.