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

オープン
#1,003 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp
領域
api

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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).

主要言語
C#
スター
901
フォーク
70
平均マージ
16時間 27分
マージ済み PR(30日)
60

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Listenarrs/Listenarr のほかの issue

Listenarrs/Listenarr の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。