mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-15 17:10:23 +08:00
[Fixes #7119] Path Comparison Case Sensitivity
This commit is contained in:
parent
0cac0ac601
commit
be31746c4e
@ -82,7 +82,7 @@ namespace Orchard.Azure.Services.FileSystems {
|
||||
private static string ConvertToRelativeUriPath(string path) {
|
||||
var newPath = path.Replace(@"\", "/");
|
||||
|
||||
if (newPath.StartsWith("/") || newPath.StartsWith("http://") || newPath.StartsWith("https://")) {
|
||||
if (newPath.StartsWith("/", StringComparison.OrdinalIgnoreCase) || newPath.StartsWith("http://", StringComparison.OrdinalIgnoreCase) || newPath.StartsWith("https://", StringComparison.OrdinalIgnoreCase)) {
|
||||
throw new ArgumentException("Path must be relative");
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ namespace Orchard.Azure.Services.FileSystems {
|
||||
return path2;
|
||||
}
|
||||
|
||||
if (path2.StartsWith("http://") || path2.StartsWith("https://")) {
|
||||
if (path2.StartsWith("http://", StringComparison.OrdinalIgnoreCase) || path2.StartsWith("https://", StringComparison.OrdinalIgnoreCase)) {
|
||||
return path2;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user