[PR #5602] [MERGED] Don't convert from IPAddress to string to IPAddress #10568

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

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/5602
Author: @daullmer
Created: 3/23/2021
Status: Merged
Merged: 4/3/2021
Merged by: @Bond-009

Base: masterHead: IP-string-IP


📝 Commits (2)

  • 19e4ef8 Remove conversion from IPAddress to string to IPAddress
  • c2af50c Add tests for IsInNetwork

📊 Changes

9 files changed (+92 additions, -42 deletions)

View changed files

📝 Emby.Server.Implementations/HttpServer/Security/SessionContext.cs (+1 -1)
📝 Jellyfin.Api/Controllers/UserController.cs (+18 -7)
📝 Jellyfin.Api/Helpers/DynamicHlsHelper.cs (+1 -1)
📝 Jellyfin.Api/Helpers/MediaInfoHelper.cs (+3 -2)
📝 Jellyfin.Api/Helpers/RequestHelpers.cs (+1 -1)
📝 MediaBrowser.Common/Extensions/HttpContextExtensions.cs (+2 -2)
📝 tests/Jellyfin.Api.Tests/Auth/LocalAccessPolicy/LocalAccessHandlerTests.cs (+2 -1)
tests/Jellyfin.Networking.Tests/NetworkManagerTests.cs (+63 -0)
📝 tests/Jellyfin.Networking.Tests/NetworkParseTests.cs (+1 -27)

📄 Description

Changes

  • Unnecessary change of data type which could lead to the wrong IP address being parsed (IsInNetwork has an overload for string and IPAddress)
  • Add log warning if Password Reset is initiated from outside the local network
  • Add tests for IsInNetwork

Issues
Code from #5180


🔄 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/5602 **Author:** [@daullmer](https://github.com/daullmer) **Created:** 3/23/2021 **Status:** ✅ Merged **Merged:** 4/3/2021 **Merged by:** [@Bond-009](https://github.com/Bond-009) **Base:** `master` ← **Head:** `IP-string-IP` --- ### 📝 Commits (2) - [`19e4ef8`](https://github.com/jellyfin/jellyfin/commit/19e4ef82dda1cbba9d533047950afb42c425749a) Remove conversion from IPAddress to string to IPAddress - [`c2af50c`](https://github.com/jellyfin/jellyfin/commit/c2af50c51dd4d49ce44604ba5b34d77fad01a130) Add tests for IsInNetwork ### 📊 Changes **9 files changed** (+92 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Server.Implementations/HttpServer/Security/SessionContext.cs` (+1 -1) 📝 `Jellyfin.Api/Controllers/UserController.cs` (+18 -7) 📝 `Jellyfin.Api/Helpers/DynamicHlsHelper.cs` (+1 -1) 📝 `Jellyfin.Api/Helpers/MediaInfoHelper.cs` (+3 -2) 📝 `Jellyfin.Api/Helpers/RequestHelpers.cs` (+1 -1) 📝 `MediaBrowser.Common/Extensions/HttpContextExtensions.cs` (+2 -2) 📝 `tests/Jellyfin.Api.Tests/Auth/LocalAccessPolicy/LocalAccessHandlerTests.cs` (+2 -1) ➕ `tests/Jellyfin.Networking.Tests/NetworkManagerTests.cs` (+63 -0) 📝 `tests/Jellyfin.Networking.Tests/NetworkParseTests.cs` (+1 -27) </details> ### 📄 Description **Changes** - Unnecessary change of data type which could lead to the wrong IP address being parsed (IsInNetwork has an overload for string and IPAddress) - Add log warning if Password Reset is initiated from outside the local network - Add tests for IsInNetwork **Issues** Code from #5180 --- <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:22:40 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#10568