mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 12:45:30 +00:00
Fix webbased upgrade routine.
This commit is contained in:
@@ -153,6 +153,34 @@ class InstallController extends Controller
|
||||
return response()->json(['error' => false, 'message' => 'OK']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Do database decrypt.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function decrypt(): JsonResponse
|
||||
{
|
||||
if ($this->hasForbiddenFunctions()) {
|
||||
return response()->json(['error' => true, 'message' => self::FORBIDDEN_ERROR]);
|
||||
}
|
||||
try {
|
||||
Log::debug('Am now calling decrypt database routine...');
|
||||
Artisan::call('firefly:decrypt-all');
|
||||
Log::debug(Artisan::output());
|
||||
} catch (Exception $e) {
|
||||
Log::error($e->getMessage());
|
||||
Log::error($e->getTraceAsString());
|
||||
if (strpos($e->getMessage(), 'open_basedir restriction in effect')) {
|
||||
return response()->json(['error' => true, 'message' => self::BASEDIR_ERROR]);
|
||||
}
|
||||
|
||||
return response()->json(['error' => true, 'message' => self::OTHER_ERROR . ' ' . $e->getMessage()]);
|
||||
}
|
||||
|
||||
return response()->json(['error' => false, 'message' => 'OK']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Do database verification.
|
||||
*
|
||||
|
Reference in New Issue
Block a user