Workaround for page reloading on gnusocial

This commit is contained in:
Bob Mottram 2016-12-12 10:10:38 +00:00
parent 6c5c9f49d6
commit 9bf944efb0
1 changed files with 11 additions and 1 deletions

View File

@ -37,7 +37,7 @@ GNUSOCIAL_DOMAIN_NAME=
GNUSOCIAL_CODE=
GNUSOCIAL_ONION_PORT=8087
GNUSOCIAL_REPO="https://git.gnu.io/gnu/gnu-social.git"
GNUSOCIAL_COMMIT='c67b89e56bf0f90730a9e22beca7e1bd41fc26c3'
GNUSOCIAL_COMMIT='7d67eefdf501f492e29f59971ac288e0414dc5b0'
GNUSOCIAL_ADMIN_PASSWORD=
GNUSOCIAL_THEME_REPO="https://git.gnu.io/h2p/Qvitter.git"
GNUSOCIAL_THEME_COMMIT='474376938b0e55c2e3d0c06d308a44a48d98ba88'
@ -73,6 +73,12 @@ gnusocial_variables=(ONION_ONLY
SHARINGS_THEME_COMMIT
MY_USERNAME)
function gnusocial_fix_endless_reloads {
# This fixes a bug introduced with commit 5f7032dfee1fd202c14e76a9f8b37af35d584901
# and which causes OrFox to endlessly reload the page
sed -i 's| && common_local_referer()||g' /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/lib/apiauthaction.php
}
function remove_user_gnusocial {
remove_username="$1"
@ -350,6 +356,8 @@ function upgrade_gnusocial {
function_check set_repo_commit
set_repo_commit /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs "gnusocial commit" "$GNUSOCIAL_COMMIT" $GNUSOCIAL_REPO
gnusocial_fix_endless_reloads
# Ensure that installation script is removed
if [ -f /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/install.php ]; then
rm /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/install.php
@ -539,6 +547,8 @@ function install_gnusocial_main {
git checkout $GNUSOCIAL_COMMIT -b $GNUSOCIAL_COMMIT
set_completion_param "gnusocial commit" "$GNUSOCIAL_COMMIT"
gnusocial_fix_endless_reloads
chmod g+w /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs
chmod a+w /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/avatar
chmod a+w /var/www/$GNUSOCIAL_DOMAIN_NAME/htdocs/file