File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 345345# Upgrade OS dependencies
346346export DEBIAN_FRONTEND=noninteractive ; apt-get dist-upgrade -y -o Dpkg::Options::=" --force-confdef" -o Dpkg::Options::=" --force-confold"
347347
348- # Temporary fix for PHP 2024 -08-27
348+ # Temporary fix for PHP 2023 -08-27
349349# There's a bug in PHP 8.1.21 which causes server to crash
350350# If you're on Ondrejs PPA, PHP isn't updated, so do that here instead
351351apt-mark unhold php* > /dev/null 2>&1
@@ -779,6 +779,23 @@ else
779779 print_text_in_color " $IGreen " " Your apps are already up to date!"
780780fi
781781
782+ # Apply correct redirect rule to avoid security check errors
783+ REDIRECTRULE=" $( grep -r " \[R=301,L\]" $SITES_AVAILABLE | cut -d " :" -f1) "
784+ if [ -n " $REDIRECTRULE " ]
785+ then
786+ # Change the redirect rule in all files in Apache available
787+ mapfile -t REDIRECTRULE <<< " $REDIRECTRULE"
788+ for rule in " ${REDIRECTRULE[@]} "
789+ do
790+ sed -i " s|\[R=301,L\]|\[END,NE,R=permanent\]|g" " $rule "
791+ done
792+ # Restart Apache
793+ if check_command apachectl configtest
794+ then
795+ restart_webserver
796+ fi
797+ fi
798+
782799# Nextcloud 13 is required.
783800lowest_compatible_nc 13
784801
You can’t perform that action at this time.
0 commit comments