mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code cleanup.
This commit is contained in:
@@ -73,6 +73,7 @@ class Authenticate
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the user is logged in to any of the given guards.
|
||||
*
|
||||
|
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
@@ -39,7 +40,7 @@ class InstallationId
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Closure $next
|
||||
* @param Closure $next
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
|
@@ -22,6 +22,7 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use FireflyIII\Models\TransactionGroup;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
@@ -114,7 +115,7 @@ class InterestingMessage
|
||||
session()->flash('success_uri', route('transactions.show', [$transactionGroupId]));
|
||||
session()->flash('success', (string)trans(sprintf('firefly.updated_%s', $type), ['description' => $title]));
|
||||
}
|
||||
if('no_change' === $message) {
|
||||
if ('no_change' === $message) {
|
||||
$type = strtolower($journal->transactionType->type);
|
||||
session()->flash('warning_uri', route('transactions.show', [$transactionGroupId]));
|
||||
session()->flash('warning', (string)trans(sprintf('firefly.no_changes_%s', $type), ['description' => $title]));
|
||||
|
@@ -48,9 +48,9 @@ class SecureHeaders
|
||||
$nonce = base64_encode(random_bytes(16));
|
||||
app('view')->share('JS_NONCE', $nonce);
|
||||
|
||||
$response = $next($request);
|
||||
$response = $next($request);
|
||||
$trackingScriptSrc = $this->getTrackingScriptSource();
|
||||
$csp = [
|
||||
$csp = [
|
||||
"default-src 'none'",
|
||||
"object-src 'self'",
|
||||
sprintf("script-src 'unsafe-inline' 'nonce-%1s' %2s", $nonce, $trackingScriptSrc),
|
||||
|
Reference in New Issue
Block a user