navidrome/ui/src
Deluan Quintão fb45ad7b9c
fix(auth): ExtAuth logout redirect on unauthenticated loads, and warning spam from untrusted sources (#6176)
* fix(ui): only redirect to ExtAuth logout URL for proxy-authenticated sessions

react-admin calls authProvider.logout() when the boot-time checkAuth fails
and after a 401, not only when the user clicks Logout. With
ExtAuth.LogoutURL set, every unauthenticated page load (e.g. direct LAN
access that bypasses the auth proxy) was sent to the IdP sign-out page and
the login form was never shown.

Redirect only when the page was authenticated by the reverse proxy
(config.auth is present). Other sessions fall back to the login form.

Fixes #6175

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(server): only warn about untrusted ExtAuth sources when the header is sent

UsernameFromExtAuthHeader checked the source IP before looking for the user
header, so every request from an IP outside ExtAuth.TrustedSources logged a
warning, even when it carried no header at all. With direct LAN access
alongside a forward-auth proxy, a single polling client produced a constant
stream of warnings (twice per Subsonic request, since the middleware chain
resolves the username in both checkRequiredParameters and authenticate).

Look for the header first and warn only when an untrusted source actually
sends it, which is the case worth seeing: a misconfigured proxy or a spoof
attempt.

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-09-19 17:08:49 -04:00
..
actions feat(ui): playlist favourites (heart, list filter, sidebar favourites-only toggle) (#5805) 2026-07-18 14:45:47 -04:00
album feat(ui): format dates using the selected language (#6160) 2026-09-19 14:07:42 -04:00
artist feat(ui): add Refresh Metadata action to the album and artist pages (#6078) 2026-09-02 23:29:31 -04:00
audioplayer fix(ui): report playback when restarting current track via prev 2026-05-22 22:23:36 -03:00
common feat(ui): format dates using the selected language (#6160) 2026-09-19 14:07:42 -04:00
dataProvider feat(jellyfin): add Quick Connect sign-in (#6174) 2026-09-19 14:57:01 -04:00
dialogs feat(jellyfin): add Quick Connect sign-in (#6174) 2026-09-19 14:57:01 -04:00
i18n feat(jellyfin): add Quick Connect sign-in (#6174) 2026-09-19 14:57:01 -04:00
icons build(ui): migrate from CRA/Jest to Vite/Vitest (#3311) 2024-09-28 11:54:36 -04:00
layout feat(jellyfin): add Quick Connect sign-in (#6174) 2026-09-19 14:57:01 -04:00
library refactor(ui): replace icons in LibraryScanButton with react-icons 2026-09-08 18:51:49 -04:00
missing feat(ui): remember 'items per page' selection across sessions (#5819) 2026-07-19 18:59:37 -04:00
personal feat(ui): add Radio to Default View options (#5801) 2026-07-17 21:53:17 -04:00
player fix(transcoding): honor player forced format on the WebUI transcode flow (#5613) 2026-06-14 20:52:19 -04:00
playlist feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
plugin feat(plugins): surface the valid agent names in logs and the Plugins UI (#5910) 2026-08-30 11:11:35 -04:00
radio feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
reducers feat(ui): playlist favourites (heart, list filter, sidebar favourites-only toggle) (#5805) 2026-07-18 14:45:47 -04:00
share fix(share): give visual feedback when downloading from a share (#5865) 2026-07-28 16:13:44 -04:00
song feat(ui): remember 'items per page' selection across sessions (#5819) 2026-07-19 18:59:37 -04:00
store feat: Multi-library support (#4181) 2025-07-18 18:41:12 -04:00
subsonic feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
themes fix(ui): prevent Safari album grid resize when top menus open (#6125) 2026-09-10 20:48:33 -04:00
transcode fix(ui): improve browser codec detection and limit Safari transcoding to mp3 (#5171) 2026-03-12 08:21:49 -04:00
transcoding fix(ui): allow setting a transcoding Default Bit Rate of 0 2026-09-09 17:35:03 -04:00
user feat(ui): format dates using the selected language (#6160) 2026-09-19 14:07:42 -04:00
utils feat(ui): format dates using the selected language (#6160) 2026-09-19 14:07:42 -04:00
App.jsx fix(ui): load ND_DEFAULTLANGUAGE on app startup (#4000) 2026-06-09 19:27:15 -04:00
authProvider.js fix(auth): ExtAuth logout redirect on unauthenticated loads, and warning spam from untrusted sources (#6176) 2026-09-19 17:08:49 -04:00
authProvider.test.js fix(auth): ExtAuth logout redirect on unauthenticated loads, and warning spam from untrusted sources (#6176) 2026-09-19 17:08:49 -04:00
config.js feat(jellyfin): add Quick Connect sign-in (#6174) 2026-09-19 14:57:01 -04:00
consts.js fix(ui): allow setting a transcoding Default Bit Rate of 0 2026-09-09 17:35:03 -04:00
eventStream.js fix(ui): keep the NowPlayingPanel badge in sync. 2025-06-29 11:35:10 -04:00
eventStream.test.js chore(deps): update all dependencies (#4618) 2025-10-25 17:05:16 -04:00
hotkeys.js Change "Go to current song" hotkey. 2022-12-18 20:58:01 -05:00
index.css chore(deps): bump JS dependencies 2025-03-07 19:47:08 -05:00
index.jsx fix(ui): service worker does not load new version of ui (#3402) 2024-10-16 21:39:14 -04:00
routes.jsx build(ui): migrate from CRA/Jest to Vite/Vitest (#3311) 2024-09-28 11:54:36 -04:00
setupTests.js fix(auth): ExtAuth logout redirect on unauthenticated loads, and warning spam from untrusted sources (#6176) 2026-09-19 17:08:49 -04:00
sw.js fix(ui): stop precaching index.html so logins can't show the wrong user (#5882) 2026-08-02 19:46:05 -04:00
swNavigation.js fix(ui): stop precaching index.html so logins can't show the wrong user (#5882) 2026-08-02 19:46:05 -04:00
swNavigation.test.js fix(ui): stop precaching index.html so logins can't show the wrong user (#5882) 2026-08-02 19:46:05 -04:00
useChangeThemeColor.jsx build(ui): migrate from CRA/Jest to Vite/Vitest (#3311) 2024-09-28 11:54:36 -04:00
vite-env.d.ts build(ui): migrate from CRA/Jest to Vite/Vitest (#3311) 2024-09-28 11:54:36 -04:00