🔒 Add #[Locked] attribute to Livewire components to enhance security against client-side state tampering

This commit is contained in:
HolgerHatGarKeineNode
2026-02-03 22:49:42 +01:00
parent 71ce57ddd3
commit 2957e89c79
13 changed files with 149 additions and 2 deletions

View File

@@ -4,26 +4,35 @@ use App\Models\EinundzwanzigPleb;
use App\Support\NostrAuth;
use App\Traits\NostrFetcherTrait;
use Flux\Flux;
use Livewire\Attributes\Locked;
use Livewire\Component;
new class extends Component
{
use NostrFetcherTrait;
#[Locked]
public ?EinundzwanzigPleb $currentPleb = null;
#[Locked]
public ?string $currentPubkey = null;
#[Locked]
public bool $currentYearIsPaid = false;
#[Locked]
public ?string $nip05Handle = '';
#[Locked]
public bool $nip05Verified = false;
#[Locked]
public ?string $nip05VerifiedHandle = null;
#[Locked]
public bool $nip05HandleMismatch = false;
#[Locked]
public array $nip05VerifiedHandles = [];
protected $listeners = [