Fix watcher self-notification, unescaped output in views
- NotificationHelper::notifyWatchers: excludeUserId parameter was accepted but never used; actors were notified of their own actions. Fix: add AND tw.user_id != ? clause to watcher query when exclusion is requested. - TicketView.php: formatAction() default case returned raw $event['action_type'] unescaped into HTML context. Fix: wrap with htmlspecialchars(). - Admin views: field_id, recurring_id, template_id, transition_id in data-id attributes were uncast; field_type was unescaped in CustomFieldsView; from/to_status slugs derived from DB values were used directly in class attributes in WorkflowDesignerView. Fix: (int) cast for IDs, htmlspecialchars for field_type, preg_replace to sanitize DB-derived CSS class slugs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -48,7 +48,7 @@ include __DIR__ . '/../../views/layout_header.php';
|
||||
<td data-label="Order" class="lt-text-xs lt-text-muted"><?= (int)$field['display_order'] ?></td>
|
||||
<td data-label="Field Name"><code class="lt-text-cyan lt-text-xs"><?= htmlspecialchars($field['field_name']) ?></code></td>
|
||||
<td data-label="Label"><strong><?= htmlspecialchars($field['field_label']) ?></strong></td>
|
||||
<td data-label="Type" class="lt-text-xs"><?= ucfirst($field['field_type']) ?></td>
|
||||
<td data-label="Type" class="lt-text-xs"><?= htmlspecialchars(ucfirst($field['field_type'])) ?></td>
|
||||
<td data-label="Category" class="lt-text-xs"><?= htmlspecialchars($field['category'] ?? 'All') ?></td>
|
||||
<td data-label="Required" class="lt-text-center">
|
||||
<?= $field['is_required'] ? '<span class="lt-text-amber">✓</span>' : '<span class="lt-text-muted">—</span>' ?>
|
||||
@@ -61,9 +61,9 @@ include __DIR__ . '/../../views/layout_header.php';
|
||||
<td data-label="Actions">
|
||||
<div class="lt-btn-group">
|
||||
<button type="button" class="lt-btn lt-btn-sm"
|
||||
data-action="edit-field" data-id="<?= $field['field_id'] ?>">EDIT</button>
|
||||
data-action="edit-field" data-id="<?= (int)$field['field_id'] ?>">EDIT</button>
|
||||
<button type="button" class="lt-btn lt-btn-sm lt-btn-danger"
|
||||
data-action="delete-field" data-id="<?= $field['field_id'] ?>">DEL</button>
|
||||
data-action="delete-field" data-id="<?= (int)$field['field_id'] ?>">DEL</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user