fix: remove CSP-blocked inline event handlers (onerror, onclick)
- Remove all onerror="this.style.display='none'" from avatar imgs in layout_header.php, DashboardView.php, and TicketView.php (PHP + JS) - Replace onclick SLA dismiss with data-action="dismiss-priority-banner" attribute; handler wired via existing click delegation in TicketView.php - Global capture-phase error delegation in layout_footer.php handles all avatar image failures by adding .lt-avatar-img-err class (CSS display:none) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -331,7 +331,7 @@ include __DIR__ . '/layout_header.php';
|
||||
<div class="workload-item">
|
||||
<div class="lt-avatar lt-avatar--sm <?= $avatarColor ?>" aria-hidden="true" title="<?= htmlspecialchars($name) ?>">
|
||||
<?php if ($userId > 0): ?>
|
||||
<img src="/api/user_avatar.php?user_id=<?= $userId ?>" alt="" class="lt-avatar-img" onerror="this.style.display='none'">
|
||||
<img src="/api/user_avatar.php?user_id=<?= $userId ?>" alt="" class="lt-avatar-img">
|
||||
<?php endif ?>
|
||||
<span class="lt-avatar-initials"><?= htmlspecialchars($initials) ?></span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user