Private
Public Access
1
0

fix(proxmox): harden console sessions and firewall rollout safety

Reduce security and reliability risk across the Proxmox extension by removing password exposure from Livewire state, hardening console auth/cookie handling, and improving sanitized error paths. Improve firewall and router performance by adding safer lazy loading, bounded pagination, cross-server compatibility guards, and lower-overhead API workflows.

Made-with: Cursor
This commit is contained in:
2026-03-28 19:34:46 -04:00
parent 9f996035db
commit 68043f0416
39 changed files with 1106 additions and 5013 deletions

View File

@@ -7,6 +7,10 @@ use Paymenter\Extensions\Servers\Proxmox\Proxmox;
class XTerm extends Component
{
public ?string $xtermUrl = null;
public bool $xtermLoadFailed = false;
public function mount(Server $server): void
{
parent::mount($server);
@@ -15,27 +19,26 @@ class XTerm extends Component
if (!$this->server->node->vnc_enabled) {
abort(403, 'Console access is not enabled on this server node.');
}
try {
$proxmox = new Proxmox;
$this->xtermUrl = $proxmox->xterm($this->server);
$this->xtermLoadFailed = false;
} catch (\Throwable $e) {
$this->xtermUrl = null;
$this->xtermLoadFailed = true;
report($e);
$this->notify('Failed to connect to console. Please try again.', 'error');
}
}
public function render()
{
try {
$proxmox = new Proxmox;
return view('proxmox::xterm', [
'xterm' => $proxmox->xterm($this->server),
])->layoutData([
'sidebar' => true,
]);
} catch (\Throwable $e) {
$this->notify('Failed to connect to console: ' . $e->getMessage(), 'error');
return view('proxmox::xterm', [
'xterm' => null,
])->layoutData([
'sidebar' => true,
]);
}
return view('proxmox::xterm', [
'xterm' => $this->xtermUrl,
])->layoutData([
'sidebar' => true,
]);
}
}