[PR #4606] [CLOSED] [Fix] Authentication Errors #10184

Closed
opened 2026-02-07 06:15:34 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/4606
Author: @BaronGreenback
Created: 11/28/2020
Status: Closed

Base: masterHead: AuthFix


📝 Commits (3)

  • dc1cec9 Merge pull request #98 from jellyfin/master
  • 1c5c59c Update AuthorizationContext.cs
  • aae9ffd Update AuthorizationContext.cs

📊 Changes

1 file changed (+13 additions, -6 deletions)

View changed files

📝 Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs (+13 -6)

📄 Description

Replaced Header[] with Header.TryGetValue() as the former creates an exception if the header is not found.

This caused the authentication flow to stop if a header was not present.

eg.

            if (string.IsNullOrEmpty(token))
            {
                token = headers["X-Emby-Token"];  <--- Exception created here if token not present.
            }

            if (string.IsNullOrEmpty(token))
            {
                token = headers["X-MediaBrowser-Token"];
            }

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/4606 **Author:** [@BaronGreenback](https://github.com/BaronGreenback) **Created:** 11/28/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `AuthFix` --- ### 📝 Commits (3) - [`dc1cec9`](https://github.com/jellyfin/jellyfin/commit/dc1cec9fd82af8742cf2b20f2da1fdf1de6bd41d) Merge pull request #98 from jellyfin/master - [`1c5c59c`](https://github.com/jellyfin/jellyfin/commit/1c5c59c5d591068ac16c2d852ad976a89c9b5e8e) Update AuthorizationContext.cs - [`aae9ffd`](https://github.com/jellyfin/jellyfin/commit/aae9ffd5acca20c6f2c3b512307f7e00f5e59add) Update AuthorizationContext.cs ### 📊 Changes **1 file changed** (+13 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs` (+13 -6) </details> ### 📄 Description Replaced Header[] with Header.TryGetValue() as the former creates an exception if the header is not found. This caused the authentication flow to stop if a header was not present. eg. ``` if (string.IsNullOrEmpty(token)) { token = headers["X-Emby-Token"]; <--- Exception created here if token not present. } if (string.IsNullOrEmpty(token)) { token = headers["X-MediaBrowser-Token"]; } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:15:34 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#10184