mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-12 08:07:10 -07:00
Fixed: Security Vulnerabilities allowing authentication to be bypass
This commit is contained in:
parent
4525f99370
commit
2ccc5af8d0
6 changed files with 116 additions and 37 deletions
|
@ -1,4 +1,4 @@
|
|||
using System.IO;
|
||||
using System.IO;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Disk;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
|
@ -28,13 +28,15 @@ namespace Lidarr.Http.Frontend.Mappers
|
|||
|
||||
public override bool CanHandle(string resourceUrl)
|
||||
{
|
||||
if (resourceUrl.StartsWith("/Content/Images/Icons/manifest") ||
|
||||
resourceUrl.StartsWith("/Content/Images/Icons/browserconfig"))
|
||||
resourceUrl = resourceUrl.ToLowerInvariant();
|
||||
|
||||
if (resourceUrl.StartsWith("/content/images/icons/manifest") ||
|
||||
resourceUrl.StartsWith("/content/images/icons/browserconfig"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return resourceUrl.StartsWith("/Content") ||
|
||||
return resourceUrl.StartsWith("/content") ||
|
||||
resourceUrl.EndsWith(".js") ||
|
||||
resourceUrl.EndsWith(".map") ||
|
||||
resourceUrl.EndsWith(".css") ||
|
||||
|
@ -43,4 +45,4 @@ namespace Lidarr.Http.Frontend.Mappers
|
|||
resourceUrl.EndsWith("oauth.html");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue