Commit Graph

1829 Commits

Author SHA1 Message Date
Nikolaj Geisle
91a0e670bb update cypress package 2022-02-28 15:43:51 +01:00
Mole
0c7ef06031 V9: Fix missing site identifier (#12040)
* Add SiteIdentifierService

* Use SiteIdentifierService in TelemetryService

* Use SiteIdentifierService when installing

* Remove timeout

* Use TryGetOrCreateSiteIdentifier in TelemetryService

* Add site identifier to dashboard url

* Fix and add tests

* Don't accept empty guid as valid site identifier

* Fix dashboard controller

* Fix site id query parameter

* Use Optionsmonitor onchange

Co-authored-by: nikolajlauridsen <nel@umbraco.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-02-28 13:59:39 +01:00
Scott Brady
25ea5cdb1b Prevent non-backoffice auth schemes being overridden (#11630) 2022-02-28 10:40:51 +01:00
Warren Buckley
bd6334ecdc Dependancy Update: Switch to Serilog.Expressions away from deprecated Serilog.Filters.Expressions (#12000)
* Uninstall Serilog.Filters.Expressions as it is deprecated by the Serilog team

NOTE: This package brought in a dependenacy on a package called SuperPower from Datalust

* Install replacement package Serilog.Expressions

* Update implementation of Serilog.Expressions

* Add new test cases to verify expressions still working

Currently Serilog.Expressions only supports short names such as @x @l @m and @mt as opposed @Exception @Level @Message and @MessageTemplate

* Use Serilog.Expressions NamedFilters extension point, to plug the missing Has() function in expressions that was not ported across by the library

* Update to dev build of Serilog.Expressions to verify new method we can override works

* Update to release build of Serilog.Expressions 3.3.0 now its been pushed to Nuget
2022-02-28 08:48:10 +01:00
Nikolaj Geisle
d1cf640f2a more build errors in Core 2022-02-27 21:20:50 +01:00
Blake Irwin
a24b099831 V9: Fix Umbraco:CMS:Global:SqlWriteLockTimeOut setting value ignored (#11492) 2022-02-27 09:52:07 +01:00
Paul Johnson
83204edbd4 V10/feature/filesystem maindomlock (#12049)
* Filesystem based MainDomLock & extract interface for MainDomKey generation (#12037)

* Extract MainDomKey generation to its own class to ease customization.

Also add discriminator config value to GlobalSettings for advanced users.
Prevents a mandatory custom implementation, should be good enough for
the vast majority of use cases.

* Prevent duplicate runs of ScheduledPublishing during slot swap.

* Add filesystem based MainDomLock

(cherry picked from commit 860c8e8ae2)

# Conflicts:
#	src/Umbraco.Infrastructure/Runtime/SqlMainDomLock.cs

* Remove obsolete constructors from ScheduledPublishing & SqlMainDomLock

* FileSystemMainDomLock promoted to default fallback for all platforms.

* Various fixes & improvements
2022-02-25 12:06:30 +00:00
Paul Johnson
4a6c409a1f Explicitly close release signal file. (#12057) 2022-02-25 10:56:45 +00:00
Paul Johnson
4351ce6ee4 Further changes requested during review of #12049 (#12053) 2022-02-25 08:22:37 +00:00
Paul Johnson
860c8e8ae2 Filesystem based MainDomLock & extract interface for MainDomKey generation (#12037)
* Extract MainDomKey generation to its own class to ease customization.

Also add discriminator config value to GlobalSettings for advanced users.
Prevents a mandatory custom implementation, should be good enough for
the vast majority of use cases.

* Prevent duplicate runs of ScheduledPublishing during slot swap.

* Add filesystem based MainDomLock
2022-02-24 10:17:34 +00:00
Ronald Barendse
2dc9ccda6d Disable packaging of JsonSchema and test projects 2022-02-24 10:24:27 +01:00
Nikolaj Geisle
b442a60403 Start work on nullable-reference types in Infrastructure project 2022-02-18 14:32:51 +01:00
Nikolaj Geisle
566648de3f Add user group tests 2022-02-18 09:26:47 +01:00
Nikolaj Geisle
224341a533 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco-Core
# Conflicts:
#	src/Umbraco.Core/Configuration/Models/SecuritySettings.cs
#	src/Umbraco.Core/Events/DeleteEventArgs.cs
#	src/Umbraco.Core/Events/IEventDispatcher.cs
#	src/Umbraco.Core/Events/PassThroughEventDispatcher.cs
#	src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs
#	src/Umbraco.Core/IO/MediaFileManager.cs
#	src/Umbraco.Core/Models/Mapping/MemberTabsAndPropertiesMapper.cs
#	src/Umbraco.Core/PropertyEditors/DataValueEditor.cs
#	src/Umbraco.Core/Routing/DefaultUrlProvider.cs
2022-02-15 09:29:58 +01:00
Bjarke Berg
a228f4e941 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs
#	src/Umbraco.Infrastructure/HostedServices/ServerRegistration/TouchServerTask.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/HostedServices/ServerRegistration/TouchServerTaskTests.cs
2022-02-13 13:39:13 +01:00
Paul Johnson
a1e562cab6 Switch ConfigureServices back to protected.
Downstream users may wish to subclass and add their application specific
services.
2022-02-12 11:57:28 +00:00
Paul Johnson
fcd4ad17bb Make webhost setup less confusing. 2022-02-12 11:41:59 +00:00
Paul Johnson
c1fddd98be Additional refactoring I have been meaning to get around to for a while. 2022-02-11 20:39:57 +00:00
Paul Johnson
76cda7fd0c Fix issue running UmbracoTestServerTestBase tests with debugger attached
Ensure ConfigureWebServer called before ConfigureServices for tests that
make use of WebApplicationFactory.

Still not apparent why tests would pass if debugger isn't attached?
2022-02-11 16:52:57 +00:00
Mole
febdac5713 Fix tests 2022-01-31 14:46:25 +01:00
Ronald Barendse
4d4aff4c67 Apply changes from #11805 and #11806 to v9 (#11904)
* Apply changes from #11805 and #11806 to v9

* Update documentation and cleanup code styling
2022-01-26 12:22:05 +01:00
Bjarke Berg
ae6920a4a2 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/scope-provider-cleanup
# Conflicts:
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
2022-01-23 14:16:44 +01:00
Bjarke Berg
e92abf7d51 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	.github/workflows/codeql-analysis.yml
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
#	src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs
2022-01-23 13:46:10 +01:00
Bjarke Berg
4843b28184 added contains check for acceptance tests 2022-01-21 19:30:38 +01:00
Bjarke Berg
eb126a77b6 Merge pull request #11893 from umbraco/v9/merge-v9-contrib-into-v9-dev
Merge v9 contrib into v9 dev
2022-01-21 13:18:35 +01:00
Bjarke Berg
12abd883a9 Member 2FA (#11889)
* Bugfix - Take ufprt from form data if the request has form content type, otherwise fallback to use the query

* External linking for members

* Changed migration to reuse old table

* removed unnecessary web.config files

* Cleanup

* Extracted class to own file

* Clean up

* Rollback changes to Umbraco.Web.UI.csproj

* Fixed migration for SqlCE

* Added 2fa for members

* Change notification handler to be on deleted

* Update src/Umbraco.Infrastructure/Security/MemberUserStore.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* updated snippets

* Fixed issue with errors not shown on member linking

* fixed issue with errors

* clean up

* Fix issue where external logins could not be used to upgrade Umbraco, because the externalLogin table was expected to look different. (Like after the migration)

* Fixed issue in Ignore legacy column now using result column.

* Updated 2fa for members + publish notification when 2fa is requested.

* Changed so only Members out of box supports 2fa

* Cleanup

* rollback of csproj file, that should not have been changed

* Removed confirmed flag from db. It was not used.

Handle case where a user is signed up for 2fa, but the provider do not exist anymore. Then it is just ignored until it shows up again

Reintroduced ProviderName on interface, to ensure the class can be renamed safely

* Bugfix

* Registering DeleteTwoFactorLoginsOnMemberDeletedHandler

* Rollback nuget packages added by mistake

* Update src/Umbraco.Infrastructure/Services/Implement/TwoFactorLoginService.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TwoFactorLoginRepository.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Added providername to snippet

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-01-21 13:10:34 +01:00
Bjarke Berg
52a3e285a9 Merge remote-tracking branch 'origin/v8/dev' into v9/dev
# Conflicts:
#	src/Umbraco.Core/Composing/CompositionExtensions/Services.cs
#	src/Umbraco.Core/Constants-AppSettings.cs
#	src/Umbraco.Core/Dashboards/ContentDashboardSettings.cs
#	src/Umbraco.Core/Dashboards/IContentDashboardSettings.cs
#	src/Umbraco.Core/Manifest/ManifestParser.cs
#	src/Umbraco.Core/Manifest/PackageManifest.cs
#	src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs
#	src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Core/Models/PropertyTagsExtensions.cs
#	src/Umbraco.Core/PropertyEditors/ComplexPropertyEditorContentEventHandler.cs
#	src/Umbraco.Core/PropertyEditors/ConfigurationEditor.cs
#	src/Umbraco.Core/PropertyEditors/DataValueEditor.cs
#	src/Umbraco.Core/PropertyEditors/ValueConverters/ImageCropperValue.cs
#	src/Umbraco.Core/Serialization/JsonToStringConverter.cs
#	src/Umbraco.Core/Sync/ApplicationUrlHelper.cs
#	src/Umbraco.Core/Telemetry/ITelemetryService.cs
#	src/Umbraco.Core/Telemetry/Models/PackageTelemetry.cs
#	src/Umbraco.Core/Telemetry/Models/TelemetryReportData.cs
#	src/Umbraco.Core/Telemetry/TelemetryService.cs
#	src/Umbraco.Tests/Manifest/ManifestParserTests.cs
#	src/Umbraco.Tests/PropertyEditors/BlockEditorComponentTests.cs
#	src/Umbraco.Tests/PropertyEditors/ImageCropperTest.cs
#	src/Umbraco.Tests/PropertyEditors/NestedContentPropertyComponentTests.cs
#	src/Umbraco.Tests/Web/Controllers/AuthenticationControllerTests.cs
#	src/Umbraco.Tests/Web/Controllers/UsersControllerTests.cs
#	src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js
#	src/Umbraco.Web.UI/Umbraco/config/lang/da.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
#	src/Umbraco.Web.UI/web.Template.config
#	src/Umbraco.Web/BatchedDatabaseServerMessenger.cs
#	src/Umbraco.Web/Cache/DistributedCacheBinder.cs
#	src/Umbraco.Web/Compose/BlockEditorComponent.cs
#	src/Umbraco.Web/Compose/NestedContentPropertyComponent.cs
#	src/Umbraco.Web/Editors/AuthenticationController.cs
#	src/Umbraco.Web/Editors/ContentTypeController.cs
#	src/Umbraco.Web/Editors/DashboardController.cs
#	src/Umbraco.Web/Editors/EntityController.cs
#	src/Umbraco.Web/Editors/UsersController.cs
#	src/Umbraco.Web/PropertyEditors/BlockEditorPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/ColorPickerConfigurationEditor.cs
#	src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs
#	src/Umbraco.Web/PropertyEditors/MediaPicker3PropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/MultiUrlPickerValueEditor.cs
#	src/Umbraco.Web/PropertyEditors/MultipleTextStringPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/MultipleValueEditor.cs
#	src/Umbraco.Web/PropertyEditors/NestedContentPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/RichTextPropertyEditor.cs
#	src/Umbraco.Web/PropertyEditors/TagsPropertyEditor.cs
#	src/Umbraco.Web/Telemetry/ReportSiteTask.cs
#	src/Umbraco.Web/Telemetry/TelemetryComponent.cs
#	src/Umbraco.Web/Trees/ContentTreeController.cs
#	src/Umbraco.Web/Umbraco.Web.csproj
#	src/Umbraco.Web/WebApi/EnableDetailedErrorsAttribute.cs
2022-01-21 12:40:18 +01:00
Sebastiaan Janssen
8eb3ef65f6 Merge branch 'v9/dev' into v9/contrib 2022-01-21 10:02:37 +01:00
Bjarke Berg
029a261476 Improve functionality for external member logins (#11855)
* Bugfix - Take ufprt from form data if the request has form content type, otherwise fallback to use the query

* External linking for members

* Changed migration to reuse old table

* removed unnecessary web.config files

* Cleanup

* Extracted class to own file

* Clean up

* Rollback changes to Umbraco.Web.UI.csproj

* Fixed migration for SqlCE

* Change notification handler to be on deleted

* Update src/Umbraco.Infrastructure/Security/MemberUserStore.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Fixed issue with errors not shown on member linking

* fixed issue with errors

* clean up

* Fix issue where external logins could not be used to upgrade Umbraco, because the externalLogin table was expected to look different. (Like after the migration)

* Fixed issue in Ignore legacy column now using result column.

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-01-19 09:21:50 +01:00
Paul Johnson
2ead758a99 Update to npoco5 2022-01-18 15:23:53 +00:00
Paul Johnson
235918ecfc Merge branch 'v9/dev' into v10/feature/merge-v9-dev
# Conflicts:
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Directory.Build.props
#	src/Umbraco.Core/Actions/ActionAssignDomain.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
#	src/Umbraco.Web.BackOffice/Controllers/AuthenticationController.cs
#	src/Umbraco.Web.BackOffice/DependencyInjection/UmbracoBuilderExtensions.cs
#	src/Umbraco.Web.Common/Extensions/ApplicationBuilderExtensions.cs
2022-01-18 11:37:43 +00:00
Paul Johnson
bf166225de Move Umbraco.Tests to legacy dir. (#11878)
(makes grep easier)
2022-01-18 10:39:22 +00:00
Paul Johnson
2a4c974568 Move services infra -> core 2022-01-14 11:34:08 +00:00
Paul Johnson
39c3fecc45 Prep for moving some services 2022-01-13 23:46:21 +00:00
Paul Johnson
eb841a7b98 Remove database properties from IScope 2022-01-13 17:44:40 +00:00
Paul Johnson
81d68f48ad v10 misc - Removed some redundant event handling code. (#11842)
* Removed some redundant event handling code.

* Cleanup

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2022-01-13 12:31:25 +01:00
Paul Johnson
3258a676c0 ScopeProvider can create its own logger if required. 2022-01-13 09:31:08 +00:00
Paul Johnson
71ce038330 Scope no longer uses MediaFileManager.
Deleting media via services results in a published MediaDeletedNotification
via scope.Notifications, these are fired on Scope.Complete() and picked up
by the registered handlers.
2022-01-13 09:24:30 +00:00
Paul Johnson
ae2ff856fb Remove IEventDispatcher, it's no longer used. 2022-01-11 17:02:20 +00:00
Paul Johnson
a952d17e74 Make using scoped services in notification handlers less painful. (#11733)
* Add failing test to demo issue with handlers + scoped dependencies.

* Make using scoped services in notification handlers less painful.

* Update comments for accuracy.
2022-01-10 15:31:46 +00:00
Nikolaj Geisle
187cac469e Add package tests (#11824) 2022-01-07 08:55:40 +01:00
Bjarke Berg
642c216f94 Serve Media and App_Plugins using WebRootFileProvider (and allow changing the physical media path) (#11783)
* Allow changing UmbracoMediaPath to an absolute path. Also ensure Imagesharp are handing requests outside of the wwwroot folder.

* Let UmbracoMediaUrl fallback to UmbracoMediaPath when empty

* Add FileSystemFileProvider to expose an IFileSystem as IFileProvider

* Replace IUmbracoMediaFileProvider with IFileProviderFactory implementation

* Fix issue resolving relative paths when media URL has changed

* Remove FileSystemFileProvider and require explicitly implementing IFileProviderFactory

* Update tests (UnauthorizedAccessException isn't thrown anymore for rooted files)

* Update test to use UmbracoMediaUrl

* Add UmbracoMediaPhysicalRootPath global setting

* Remove MediaFileManagerImageProvider and use composited file providers

* Move CreateFileProvider to IFileSystem extension method

* Add rooted path tests

Co-authored-by: Ronald Barendse <ronald@barend.se>
2022-01-06 13:35:24 +01:00
Nikolaj Geisle
bc6d8b5ece v9: Throw error on duplicate routes (#11774)
* Add conflicting route service and check

* Added testclass

* Cleanup

* Update src/Umbraco.Web.BackOffice/Services/ConflictingRouteService.cs

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>

* Implemented out variable

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2021-12-22 13:03:38 +01:00
Mole
53e5a25df8 Remove ugly CharCollection hack
By adding a new configuration and mapping the old CharCollection to that, we can get around having to return null the first time, by obsoleting the old one and redirecting to the new GetCharReplacements method
2021-12-22 11:29:04 +01:00
Nikolaj Geisle
76cf5037e5 v9: Move local xml package files to database instead (#11654)
* Move package to database

* Added migration and implemented new repository

* Updated migrations to use proper xml convert

* Fixed save function and renamed createDate to update date

* Updated dependencyInjection

* Updated UmbracoPlan.cs

* Apply suggestions from code review

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>

* Added File check

* Tried using same context as create table

* Fix DTO

* Fix GetById and local package saving

* Fix images when migrating

* Implement deletion of all local files

* Only delete local repo file, not file snapshots

* Remove static package path and use the one we save

* Update package repo to export package and remove check for ids when exporting

* Minor fixes

* Fix so that you can download package after creating

* Update savePackage method to export package afterwards

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2021-12-21 14:02:49 +01:00
Mole
80cda3364b Make CharCollection return the merged result
Since this is the way it's been previously, we cannot change the behaviour of this. Unfortunately due to how the config binding works, we have to make sure it returns null the very first time it's called by the framework to ensure that overrides actually gets registered.
2021-12-21 13:35:30 +01:00
Mole
d77e198d31 Move unit test to the new location 2021-12-21 10:44:36 +01:00
Mole
8a8b1e3247 Rename CharacterReplacement back to CharItem
Since the class is public renaming this would be a breaking change, since if anyone is directly referring to the class it would break
2021-12-21 10:30:19 +01:00
Mole
c4f8944add Merge branch 'v9/contrib' into temp-11381 2021-12-21 09:42:39 +01:00
Ronald Barendse
0ba51f87ea Move member properties to Member Content App (V9 merge regression) (#11768)
* Fix regression after merging to v9

* Update test to align with removed member properties
2021-12-20 08:45:11 +01:00