diff --git a/Dockerfile b/Dockerfile index b28c0a6d..e8393e99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,7 +62,7 @@ SHELL ["/bin/ash", "-eo", "pipefail", "-c"] ARG CRS_VER=v4.0.0 COPY rootfs / -COPY --from=zoeyvid/certbot-docker:25 /usr/local /usr/local +COPY --from=zoeyvid/certbot-docker:26 /usr/local /usr/local COPY --from=zoeyvid/curl-quic:373 /usr/local/bin/curl /usr/local/bin/curl RUN apk upgrade --no-cache -a && \ diff --git a/backend/internal/host.js b/backend/internal/host.js index 58e1d09a..b2772bee 100644 --- a/backend/internal/host.js +++ b/backend/internal/host.js @@ -20,18 +20,14 @@ const internalHost = { let combined_data = _.assign({}, existing_data, data); if (!combined_data.certificate_id) { - combined_data.ssl_forced = false; - combined_data.http2_support = false; + combined_data.ssl_forced = false; + combined_data.hsts_subdomains = false; } if (!combined_data.ssl_forced) { combined_data.hsts_enabled = false; } - if (!combined_data.hsts_enabled) { - combined_data.hsts_subdomains = false; - } - return combined_data; }, diff --git a/backend/package.json b/backend/package.json index c007e1ba..6902c1bb 100644 --- a/backend/package.json +++ b/backend/package.json @@ -6,7 +6,7 @@ "dependencies": { "@apidevtools/json-schema-ref-parser": "11.5.4", "ajv": "6.12.6", - "archiver": "7.0.0", + "archiver": "7.0.1", "batchflow": "0.4.0", "bcrypt": "5.1.1", "body-parser": "1.20.2", diff --git a/rootfs/usr/local/bin/start.sh b/rootfs/usr/local/bin/start.sh index ce3c6394..938ff126 100755 --- a/rootfs/usr/local/bin/start.sh +++ b/rootfs/usr/local/bin/start.sh @@ -845,9 +845,11 @@ nginxbeautifier -s 4 -r /data/nginx rm -vf /usr/local/nginx/logs/nginx.pid rm -vf /run/*.sock -chmod -R 770 /data/tls \ - /data/etc/npm \ - /data/etc/access +find /data/tls \ + /data/etc/npm \ + /data/etc/access \ + -not -perm 770 \ + -exec chmod 770 {} \; if [ "$PUID" != "0" ]; then if id -u npm > /dev/null 2>&1; then @@ -870,10 +872,12 @@ if [ "$PUID" != "0" ]; then echo "ERROR: Unable to set group against the user properly" sleep inf fi - chown -R "$PUID:$PGID" /usr/local \ - /data \ - /run \ - /tmp + find /usr/local \ + /data \ + /run \ + /tmp \ + -not -user "$PUID" -or -not -group "$PGID" \ + -exec chown "$PUID:$PGID" {} \; if [ "$PHP81" = "true" ]; then sed -i "s|user =.*|;user = root|" /data/php/81/php-fpm.d/www.conf sed -i "s|group =.*|;group = root|" /data/php/81/php-fpm.d/www.conf @@ -889,10 +893,12 @@ if [ "$PUID" != "0" ]; then sed -i "s|user root;|#user root;|g" /usr/local/nginx/conf/nginx.conf exec sudo -Eu npm launch.sh else - chown -R 0:0 /usr/local \ - /data \ - /run \ - /tmp + find /usr/local \ + /data \ + /run \ + /tmp \ + -not -user 0 -or -not -group 0 \ + -exec chown 0:0 {} \; if [ "$PHP81" = "true" ]; then sed -i "s|;user =.*|user = root|" /data/php/81/php-fpm.d/www.conf sed -i "s|;group =.*|group = root|" /data/php/81/php-fpm.d/www.conf