Fix setDur implicit event, title XSS, hardcoded pulse URL, suppress error toast
- suppressions.html: setDur() now takes explicit element param instead of relying on implicit global event.target (which fails outside direct click handlers) - suppressions.html: removeSuppression() now shows error toast on failed DELETE - templates/index.html: escape description in title attribute with |e filter to prevent attribute breakout on quotes in description text - diagnose.py: derive Pulse execution URL from pulse_client.url instead of hardcoding http://pulse.lotusguild.org Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -180,10 +180,10 @@
|
||||
document.getElementById('s-name').required = (t!=='all');
|
||||
}
|
||||
|
||||
function setDur(mins) {
|
||||
function setDur(mins, el) {
|
||||
document.getElementById('s-expires').value = mins || '';
|
||||
document.querySelectorAll('.duration-pills .pill').forEach(p => p.classList.remove('active'));
|
||||
event.target.classList.add('active');
|
||||
if (el) el.classList.add('active');
|
||||
const hint = document.getElementById('s-dur-hint');
|
||||
if (mins) {
|
||||
const h = Math.floor(mins/60), m = mins%60;
|
||||
@@ -224,6 +224,8 @@
|
||||
if (data.success) {
|
||||
document.getElementById(`sup-row-${id}`)?.remove();
|
||||
showToast('Suppression removed', 'success');
|
||||
} else {
|
||||
showToast(data.error || 'Failed to remove suppression', 'error');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user