Various updates.

This commit is contained in:
James Cole
2024-02-18 11:35:08 +01:00
parent 997dc3814b
commit b1afaea1aa
9 changed files with 93 additions and 31 deletions

View File

@@ -123,15 +123,15 @@ class ForgotPasswordController extends Controller
}
/**
* @return void
* @throws FireflyException
*/
private function validateHost(): void {
$configuredHost = parse_url((string)config('app.url'), PHP_URL_HOST);
private function validateHost(): void
{
$configuredHost = parse_url((string)config('app.url'), PHP_URL_HOST);
if(false === $configuredHost || null === $configuredHost) {
throw new FireflyException('Please set a valid and correct Firefly III URL in the APP_URL environment variable.');
}
$host = request()->host();
$host = request()->host();
if($configuredHost !== $host) {
throw new FireflyException('The Host-header does not match the host in the APP_URL environment variable. Please make sure these match. See also: https://bit.ly/FF3-host-header');
}

View File

@@ -81,7 +81,6 @@ class ResetPasswordController extends Controller
return view('error', compact('message'));
}
$rules = [
'token' => 'required',
'email' => 'required|email',

View File

@@ -24,7 +24,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers;
use Carbon\Carbon;
use Exception;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Http\Middleware\IsDemoUser;
use FireflyIII\Models\AccountType;
@@ -178,7 +177,9 @@ class DebugController extends Controller
'db_version' => app('fireflyconfig')->get('db_version', 1)->data,
'php_version' => PHP_VERSION,
'php_os' => PHP_OS,
'uname' => php_uname('m'),
'interface' => \PHP_SAPI,
'bits' => \PHP_INT_SIZE * 8,
'bcscale' => bcscale(),
'display_errors' => ini_get('display_errors'),
'error_reporting' => $this->errorReporting((int)ini_get('error_reporting')),