Webhook "Test" returns bare 403 when the login screen is disabled

Aperta
#1,003 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
api

Direzione di ricerca

Start with DiagnosticsController.cs and the UI path for Settings → Notifications, then trace how the test-notification endpoint handles the [LocalOrAdmin] response. The issue suggests displaying a useful explanation when the request is forbidden; check related issue #655 for the similar API-key behavior. Done when the failure explains the login-screen or local/API-key requirement and the UI presents that message.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

p3

Version: canary-1.3.4 (ghcr.io/listenarrs/listenarr), Docker on Unraid, login screen disabled (default)

What happens
In Settings → Notifications, clicking Test on a webhook fails with:

{"type":"https://tools.ietf.org/html/rfc9110#section-15.5.4","title":"Forbidden","status":403,"traceId":"..."}

It fails identically for any webhook URL, including a public one, and nothing is written to the container log.

Cause
POST /api/v1/diagnostics/test-notification is marked [LocalOrAdmin] (DiagnosticsController.cs). With authentication disabled, no caller is an authenticated admin, so anyone not on loopback (i.e. every browser reaching the container over the LAN) gets a 403.

Why it's a problem

  • The UI shows the raw error with no hint that enabling the login screen fixes it. It looks like a broken webhook or ntfy setup.
  • Enabling the login screen and creating an admin user makes the Test work, so the guard behaves as coded. The failure is silent and misleading.

Suggested fix
Return a message like "Testing webhooks requires the login screen to be enabled or a local/API-key request", and have the UI show it. Related: #655 (same pattern for the API-key endpoints, where the UI also hides the 403).

Lingua principale
C#
Stelle
901
Fork
70
Merge medio
16h 27m
PR unite (30g)
60

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Listenarrs/Listenarr

Tutte le issue di Listenarrs/Listenarr

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.