* Validate that imageUrl param is a relative path
To prevent open redirects, the imagePath should point to a relative path (i.e. not point to a different domain).
* LocalRedirectResult instead of RedirectResult
Uri.Relative does not prevent paths like //google.com/test.jpg
Checking for both relative and local seems to cover all the cases.
* Allow IMediaFileSystem to be replace in the DI, or registered with inner filesystem
* Remove GetFileSystem from Filesystems
It was only used by tests.
* Make MediaFileSystem inherit from PhysicalFileSystem directly
* Remove FileSystemWrapper
* Remove inner filesystem from MediaFileSystem
* Add MediaFileManager and bare minimum to make it testable
* Remove MediaFileSystem
* Fix unit tests using MediaFileManager
* Remove IFileSystem and rely only on FileSystem
* Hide dangerous methods in FileSystems and do some cleaning
* Apply stylecop warnings to MediaFileManager
* Add FilesystemsCreator to Tests.Common
This allows you to create an instance if FileSystems with your own specified IFileSystem for testing purposes outside our own test suite.
* Allow the stylesheet filesystem to be replaced.
* Fix tests
* Don't save stylesheetWrapper in a temporary var
* refactor(FileSystems): change how stylesheet filesystem is registered
* fix(FileSystems): unable to overwrite media filesystem
SetMediaFileSystem added the MediaManager as a Singleton instead of
replacing the existing instance.
* fix(FileSystems): calling AddFileSystems replaces MediaManager
When calling AddFileSystems after SetMediaFileSystem the MediaManager
gets replaced by the default PhysicalFileSystem, so instead of calling
SetMediaFileSystem in AddFileSystems we now call TrySetMediaFileSystem
instead. This method will not replace any existing instance of the
MediaManager if there's already a MediaManager registered.
* Use SetMediaFileSystem instead of TrySet, and rename AddFilesystems to ConfigureFileSystems
Also don't call AddFileSystems again in ConfigureFilesystems
* Don't wrap CSS filesystem twice
* Add CreateShadowWrapperInternal to avoid casting
* Throw UnauthorizedAccessException isntead of InvalidOperationException
* Remove ResetShadowId
Co-authored-by: Rasmus John Pedersen <mail@rjp.dk>
* Rename Umbraco.Core namespace to Umbraco.Cms.Core
* Move extension methods in core project to Umbraco.Extensions
* Move extension methods in core project to Umbraco.Extensions
* Rename Umbraco.Examine namespace to Umbraco.Cms.Examine
* Move examine extensions to Umbraco.Extensions namespace
* Reflect changed namespaces in Builder and fix unit tests
* Adjust namespace in Umbraco.ModelsBuilder.Embedded
* Adjust namespace in Umbraco.Persistence.SqlCe
* Adjust namespace in Umbraco.PublishedCache.NuCache
* Align namespaces in Umbraco.Web.BackOffice
* Align namespaces in Umbraco.Web.Common
* Ensure that SqlCeSupport is still enabled after changing the namespace
* Align namespaces in Umbraco.Web.Website
* Align namespaces in Umbraco.Web.UI.NetCore
* Align namespaces in Umbraco.Tests.Common
* Align namespaces in Umbraco.Tests.UnitTests
* Align namespaces in Umbraco.Tests.Integration
* Fix errors caused by changed namespaces
* Fix integration tests
* Undo the Umbraco.Examine.Lucene namespace change
This breaks integration tests on linux, since the namespace wont exists there because it's only used on windows.
* Fix merge
* Fix Merge