Browse Source

Move update one step before (#7989)

Closes https://github.com/FreshRSS/FreshRSS/issues/7897
Inverle 6 months ago
parent
commit
f2c6942a60
1 changed files with 5 additions and 4 deletions
  1. 5 4
      app/Controllers/updateController.php

+ 5 - 4
app/Controllers/updateController.php

@@ -128,6 +128,11 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController {
 			Minz_Error::error(403);
 		}
 
+		if (!(Minz_Request::actionName() === 'apply' && Minz_Request::paramBoolean('post_conf')) &&
+			FreshRSS_Auth::requestReauth()) {
+			return;
+		}
+
 		include_once LIB_PATH . '/lib_install.php';
 
 		invalidateHttpCache();
@@ -269,10 +274,6 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController {
 			Minz_Request::forward(['c' => 'update'], true);
 		}
 
-		if (FreshRSS_Auth::requestReauth()) {
-			return;
-		}
-
 		if (Minz_Request::paramBoolean('post_conf')) {
 			if (self::isGit()) {
 				$res = !self::hasGitUpdate();