Skip to content

Commit

Permalink
referrer policy already in .htaccess in NC14.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Nov 23, 2018
1 parent bcac4bc commit b0262f9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 4 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

[v0.67.0](https://github.com/nextcloud/nextcloudpi/commit/56ef7da) (2018-11-22) upgrade to NC14.0.4
[v0.67.1](https://github.com/nextcloud/nextcloudpi/commit/f04770e) (2018-11-23) referrer policy already in .htaccess in NC14.0.4

[v0.66.6](https://github.com/nextcloud/nextcloudpi/commit/5aeb83c) (2018-11-18) nc-static-IP: clarify usage
[v0.67.0](https://github.com/nextcloud/nextcloudpi/commit/bcac4bc) (2018-11-22) upgrade to NC14.0.4

[v0.66.6 ](https://github.com/nextcloud/nextcloudpi/commit/5aeb83c) (2018-11-18) nc-static-IP: clarify usage

[v0.66.4](https://github.com/nextcloud/nextcloudpi/commit/f3666d6) (2018-11-11) build: package php7.2-imagick now available

Expand Down
1 change: 0 additions & 1 deletion lamp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ EOF
cat >> /etc/apache2/apache2.conf <<EOF
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
Header always set Referrer-Policy "no-referrer"
</IfModule>
EOF

Expand Down
13 changes: 8 additions & 5 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,6 @@ EOF
}
EOF

# remove redundant opcache configuration. Leave until update bug is fixed -> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815968
# Bug #416 reappeared after we moved to php7.2 and debian buster packages.
[[ "$( ls -l /etc/php/7.2/fpm/conf.d/*-opcache.ini | wc -l )" -gt 1 ]] && rm "$( ls /etc/php/7.2/fpm/conf.d/*-opcache.ini | tail -1 )"
[[ "$( ls -l /etc/php/7.2/cli/conf.d/*-opcache.ini | wc -l )" -gt 1 ]] && rm "$( ls /etc/php/7.2/cli/conf.d/*-opcache.ini | tail -1 )"

# update launcher
cat > /home/www/ncp-launcher.sh <<'EOF'
#!/bin/bash
Expand Down Expand Up @@ -230,6 +225,14 @@ EOF
cd - &>/dev/null
}

# remove redundant opcache configuration. Leave until update bug is fixed -> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815968
# Bug #416 reappeared after we moved to php7.2 and debian buster packages. (keep last)
[[ "$( ls -l /etc/php/7.2/fpm/conf.d/*-opcache.ini | wc -l )" -gt 1 ]] && rm "$( ls /etc/php/7.2/fpm/conf.d/*-opcache.ini | tail -1 )"
[[ "$( ls -l /etc/php/7.2/cli/conf.d/*-opcache.ini | wc -l )" -gt 1 ]] && rm "$( ls /etc/php/7.2/cli/conf.d/*-opcache.ini | tail -1 )"

# in NC14.0.4 the referrer policy is included in .htaccess
grep -q Referrer-Policy /var/www/nextcloud/.htaccess && sed -i /Referrer-Policy/d /etc/apache2/apache2.conf

} # end - only live updates

exit 0
Expand Down

0 comments on commit b0262f9

Please sign in to comment.