aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Updates
diff options
context:
space:
mode:
authorDavid Federman <dfederm@microsoft.com>2026-06-03 08:04:39 -0700
committerDavid Federman <dfederm@microsoft.com>2026-06-03 08:04:39 -0700
commit26a149a970ad1f88fbd6e1676a5098e4a63531fe (patch)
tree47805561c54586258f65db7d3c72c1c7d6cbcedb /Emby.Server.Implementations/Updates
parent5104497331c0519c551e1af6b3999f0da0d65058 (diff)
Address PR comment
Diffstat (limited to 'Emby.Server.Implementations/Updates')
-rw-r--r--Emby.Server.Implementations/Updates/InstallationManager.cs9
1 files changed, 3 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs
index c8a2d98bf4..110c388fbe 100644
--- a/Emby.Server.Implementations/Updates/InstallationManager.cs
+++ b/Emby.Server.Implementations/Updates/InstallationManager.cs
@@ -32,6 +32,8 @@ namespace Emby.Server.Implementations.Updates
/// </summary>
public class InstallationManager : IInstallationManager
{
+ private static readonly char[] InvlidPackageNameChars = [.. Path.GetInvalidFileNameChars(), '/', '\\'];
+
/// <summary>
/// The logger.
/// </summary>
@@ -602,12 +604,7 @@ namespace Emby.Server.Implementations.Updates
return false;
}
- if (name.Contains('/', StringComparison.Ordinal) || name.Contains('\\', StringComparison.Ordinal))
- {
- return false;
- }
-
- if (name.AsSpan().IndexOfAny(Path.GetInvalidFileNameChars()) >= 0)
+ if (name.AsSpan().IndexOfAny(InvlidPackageNameChars) >= 0)
{
return false;
}