[PR #5255] [MERGED] Validate the new username when renaming #10449

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

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/5255
Author: @cvium
Created: 2/17/2021
Status: Merged
Merged: 2/18/2021
Merged by: @Bond-009

Base: masterHead: fix_renameuser


📝 Commits (2)

  • 442e770 Validate the new username when renaming
  • 2112d2a Restructure tests

📊 Changes

4 files changed (+65 additions, -9 deletions)

View changed files

Jellyfin.Server.Implementations/Properties/AssemblyInfo.cs (+23 -0)
📝 Jellyfin.Server.Implementations/Users/UserManager.cs (+13 -9)
📝 tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj (+1 -0)
tests/Jellyfin.Server.Implementations.Tests/Users/UserManagerTests.cs (+28 -0)

📄 Description

Changes
Copied AssemblyInfo.cs from Emby.Server.Implementations in order to use InternalsVisibleTo.

Made a new function that throws if the username is invalid. This is used when creating a new user and when renaming an existing user.

I wanted to create an additional test to verify that creation and renaming actually calls the function but it proved to be very annoying to do... so I didn't.

Issues
Fixes #5245


🔄 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/5255 **Author:** [@cvium](https://github.com/cvium) **Created:** 2/17/2021 **Status:** ✅ Merged **Merged:** 2/18/2021 **Merged by:** [@Bond-009](https://github.com/Bond-009) **Base:** `master` ← **Head:** `fix_renameuser` --- ### 📝 Commits (2) - [`442e770`](https://github.com/jellyfin/jellyfin/commit/442e7706880bba9a95404b4d04972674ad65d085) Validate the new username when renaming - [`2112d2a`](https://github.com/jellyfin/jellyfin/commit/2112d2a9a0004fc336345170f009fa843fe374e9) Restructure tests ### 📊 Changes **4 files changed** (+65 additions, -9 deletions) <details> <summary>View changed files</summary> ➕ `Jellyfin.Server.Implementations/Properties/AssemblyInfo.cs` (+23 -0) 📝 `Jellyfin.Server.Implementations/Users/UserManager.cs` (+13 -9) 📝 `tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj` (+1 -0) ➕ `tests/Jellyfin.Server.Implementations.Tests/Users/UserManagerTests.cs` (+28 -0) </details> ### 📄 Description <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** Copied AssemblyInfo.cs from Emby.Server.Implementations in order to use `InternalsVisibleTo`. Made a new function that throws if the username is invalid. This is used when creating a new user and when renaming an existing user. I wanted to create an additional test to verify that creation and renaming actually calls the function but it proved to be very annoying to do... so I didn't. **Issues** Fixes #5245 --- <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:20: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#10449