Commit Graph

248 Commits

Author SHA1 Message Date
Ronald Barendse
4d760a54c8 Set redirect URL when building model (#12969)
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
(cherry picked from commit 544cb30602)
2022-12-16 13:00:39 +01:00
Elitsa Marinovska
dabc7bed9b Enabling an Umbraco admin user to disable 2FA for a member (#13369)
* Fix Invalid authentication code bug

* Add translation keys for 2fa

* Display toggle for 2FA on member

* Add TwoFactorEnabled prop when saving member

* Handle disabling of 2FA

* Fix tests

* Changing obsolete msg

(cherry picked from commit af6b8fc5cb)
2022-12-14 13:50:16 +01:00
Bjarke Berg
2d564a11b9 Maintenance page when in upgrade state (#13551)
* Added functionality to show maintenance page and fixed issues with showing custom api controllers and 404 page, when umbraco had been in install or upgrade state

* Fixed Tests

* Fixed typo

* Fixed issue with login screen redirecting to website when in upgrade state, instead of backoffice
2022-12-14 08:14:19 +01:00
Justin Neville
f28b4c1279 Fix for issue 13017 - BeginUmbracoForm doesn't work with custom umbraco routes (#13103)
* Fix issue with custom Umbraco routes not working after submitting to a Surface controller

* Added comments

* Fixed breaking changes

* Fixed test by using correct new ctor

* Fixed initializtion of UmbracoRouteValueTransformer due to ambiguous ctor

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-12-06 12:42:06 +01:00
Andy Butland
efb994ecf7 Adds a parameter to BeginUmbracoForm to allow the disabling of the creation of an antiforgery token. (#13037)
* Addes a parameter to BeginUmbracoForm to allow the disabling of the creation of an antiforgery token.

* Updated project references for Forms and Deploy in the JsonSchema project.

* Revert "Updated project references for Forms and Deploy in the JsonSchema project."

This reverts commit a749b45ab8ae1815c8c321fad8a5c48a2b525410.

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-05 12:56:42 +02:00
Ronald Barendse
bc21c64617 v10: Cleanup project files (#13111)
* Backport project cleanup from #12907

* Remove empty Directory.Build.props

* Fix GenerateAppsettingsSchema target

* Re-add empty Directory.Build.props to prevent inheritance

* Add NRT to-do comment

* Explicitly generate HTTPS development certificate for E2E test
2022-10-05 12:11:51 +02:00
Ronald Barendse
7890a265ab Internalize Umbraco.Cms.ManagementApi references 2022-09-27 23:43:07 +02:00
Sebastiaan Janssen
26d83381f2 Merge branch 'v10/contrib' into v10/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/installer/steps/user.html
#	src/Umbraco.Web.UI.Client/src/less/installer.less
2022-08-18 11:23:08 +02:00
Warren Buckley
faf4320eb5 Add new UmbracoBuiilder extension methods to discover and set an IUmbracoTreeSearcherFields (#12751) 2022-08-04 11:21:36 +02:00
vsilvar
b27c03f001 Fixed ContentLastChanceFinder not being called for nodes without template (#12002)
This commit also ensure that the domain and culture is set before the ContentLastChanceFinder executes
2022-07-18 08:47:45 +10:00
Bjarke Berg
b232ff98a0 Fix formatting after merge and fix nullability 2022-06-27 08:31:34 +02:00
Bjarke Berg
9ad790f36b Updated nuget dependencies (07-06-2022) (#12525)
* Updated nuget dependencies

* Move Nerdbank.GitVersioning update to Directory.Build.props

* Updated more dependencies
2022-06-08 08:19:43 +02:00
Bjarke Berg
07f685679b Changes to Basic Auth to support external logins (#12434)
* Fixed issues with basic auth middleware to support Umbraco Cloud usecase

* Fix redirects to return url, now allows website urls

* Strip potential domain part of returnPath

* Fix default value in appsettings schema

* Reintroduce check of basic auth enabled.

* Fix wrong negation introduced in #12349

* Fixed issues with redirects

* Also check external login cookie, while authenticating backoffice
2022-06-02 12:24:26 +02:00
Asbjørn Riis-Knudsen
d810d66e9a Fix #12454 by having Coalesce handle null values (#12456)
* Fix #12454 by having Coalesce handle null values

* Allow null values in Html.Coalesce #12454
2022-05-24 18:20:48 +02:00
Ronald Barendse
af4e3ca1a6 NRT amends for WithCollectionBuilder to improve API (#12387)
* Remove WithCollectionBuilder nullability to improve API

* Fix TryGetValue nullable out type
2022-05-10 19:29:55 +02:00
Nikolaj Geisle
4f3d680f06 V10: Build warnings in Web.Website (#12332)
* add new rule to globalconfig

* Fix warnings in Web.Website

* Fix more warnings in Web.Website

* Fix more build warnings in Web.Website

* Fix more warnings in Web.Website

* Fix tests

* Fix proper constructor call

* Fix not being able to run project

* Fix Obsolete method

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2022-05-06 15:06:39 +02:00
Bjarke Berg
4bc5d31dfe Merged IMemberSignInManagerExternalLogins into IMemberSignInManager 2022-05-02 12:32:25 +02:00
Nikolaj Geisle
f23b57db65 V10: fix more nullable references (#12321)
* Add Nullable and WarningsAsErrors to Build.props

* Remove Nullable from cs proj, add ImplicitUsings to build.props

* Fix errors in core

* Fix in JsonSchema

* Fix infrastructure

* Add non-ambiguous using

* Fix Web/Lucene

* Fix backoffice

* Fix up new build errors from merge

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
2022-04-29 15:02:36 +02:00
Paul Johnson
95aa143db0 v10 make migration from v9 less painful WRT IScope (#12293)
* Restore IEventDispatcher

* Fix breaking changes WRT IScopeProvider and IScope

* Update internal usage.

* Update src/Umbraco.Core/Services/UserService.cs

* Better obsolete message

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-04-26 10:22:37 +01:00
Nikolaj Geisle
001f7035f3 Fix nullability of username 2022-04-22 09:52:07 +02:00
Nikolaj Geisle
b67810cc69 Fix new warnings 2022-04-21 11:20:12 +02:00
Nikolaj Geisle
060e0181a7 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco.Web.Backoffice
# Conflicts:
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Collections.cs
#	src/Umbraco.Core/Extensions/PublishedContentExtensions.cs
#	src/Umbraco.Core/Telemetry/Models/TelemetryReportData.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs
#	src/Umbraco.PublishedCache.NuCache/ContentStore.cs
#	src/Umbraco.Web.BackOffice/Trees/MemberTypeTreeController.cs
#	src/Umbraco.Web.Common/ModelsBuilder/InMemoryModelFactory.cs
#	src/Umbraco.Web.Common/Security/MemberManager.cs
#	src/Umbraco.Web.Website/Routing/ControllerActionSearcher.cs
#	src/Umbraco.Web.Website/Routing/IControllerActionSearcher.cs
#	src/Umbraco.Web.Website/Routing/UmbracoRouteValueTransformer.cs
2022-04-21 10:26:51 +02:00
Bjarke Berg
23a49161d6 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	build/build.ps1
#	build/templates/UmbracoPackage/.template.config/template.json
#	build/templates/UmbracoProject/.template.config/dotnetcli.host.json
#	build/templates/UmbracoProject/.template.config/ide.host.json
#	build/templates/UmbracoProject/.template.config/template.json
#	src/Umbraco.Core/Constants-System.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
#	src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs
#	src/Umbraco.Web.BackOffice/Controllers/AuthenticationController.cs
#	umbraco-netcore-only.sln
2022-04-20 11:09:28 +02:00
VWA Software internet
7e6e9c7431 Include the PluginController Area when searching for matching surface… (#12218) 2022-04-19 17:58:59 +02:00
Andy Butland
68353f9d06 Fixes RedirectToUmbracoPageResult to handle redirects to pages with domains defined on them (#12259)
* Fixes RedirectToUmbracoPageResult to handle redirects to pages with domains defined on them.

* Renamed variable to match with updated service type.

* Apply suggestions from code review

Co-authored-by: Ronald Barendse <ronald@barend.se>

* Fixed usage of IUrlHelper.

Co-authored-by: Ronald Barendse <ronald@barend.se>
2022-04-19 08:13:24 +02:00
Nikolaj Geisle
acf60ce84c Update csproj to nullable 2022-04-04 15:02:53 +02:00
Nikolaj Geisle
7994f5c326 Add nullability to Web.Website, Sqlite & SqlServer 2022-04-04 14:47:54 +02:00
Nikolaj Geisle
4ebd20bb66 Merge remote-tracking branch 'origin/v10/dev' into v10/feature/nullable-reference-types-in-Umbraco-Core
# Conflicts:
#	build/build.ps1
#	src/Umbraco.Core/Configuration/ConfigConnectionString.cs
#	src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs
#	src/Umbraco.Core/Install/InstallSteps/TelemetryIdentifierStep.cs
#	src/Umbraco.Core/Models/ContentType.cs
#	src/Umbraco.Infrastructure/Migrations/Install/DatabaseBuilder.cs
#	tests/Umbraco.Tests.AcceptanceTest/package.json
2022-03-16 13:00:38 +01:00
Bjarke Berg
981e66a673 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	src/Umbraco.Core/Telemetry/TelemetryService.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.CoreServices.cs
#	src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs
#	src/Umbraco.Infrastructure/HostedServices/ScheduledPublishing.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Infrastructure/Runtime/SqlMainDomLock.cs
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
#	src/Umbraco.Web.BackOffice/Controllers/DashboardController.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/HostedServices/ScheduledPublishingTests.cs
2022-03-10 14:36:30 +01:00
Paul Johnson
ca5c85e656 v9 fix misc issues external member login (#12093)
* Add missing override for SetTokenAsync

* Fix mismatch between expected scheme prefix and exception message

* Store tokens on member update
2022-03-03 17:18:39 +00:00
Matt Brailsford
44e8808079 Check form and querystring when validating ufprt in ValidateUmbracoFormRouteStringAttribute (#11957)
* Check form and querystring when validating ufprt

Checks to see if the request has form data before validating the `ufprt` parameter, and if it doesn't assumes it must be on the querystring

* Create GetUfprt extension method

* Use GetUfprt extension

* Update UmbracoRouteValueTransformer to use GetUfrpt()

* Added missing using statement

* Check for StringValues.Empty
2022-03-03 10:42:14 +00: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
Nikolaj Geisle
83baba696c Fixed build errors after turning nullability errors off 2022-02-10 10:32:45 +01:00
Bjarke Berg
3d28552a77 Add settings to bypass 2fa for external logins (#11959)
* Added settings for bypassing 2fa for external logins

* Fixed issue with saving roles using member ID before the member had an ID.

* Added missing extension method

* Removed test classes from git

* rollback csproj
2022-02-09 10:19:39 +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
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
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
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
Bjarke Berg
baba7ffed9 Bugfix - Take ufprt from form data if the request has form content type, otherwise fallback to use the query (#11845) 2022-01-12 13:54:14 +01:00
Bjarke Berg
47c1058195 Merge remote-tracking branch 'origin/v9/dev' into v10/dev
# Conflicts:
#	src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs
2021-12-15 14:41:49 +01:00
Nikolaj Geisle
dd7805552f v9: Remove install endpoint as valid endpoint (#11710)
* Remove installer endpoint from valid candidates

* Removed unrelevant change
2021-12-02 10:01:23 +01:00
Elitsa Marinovska
61f459670c Update to .NET6 and ASP.NET Core 6 (#11652)
* Changed targetFramework in nuspec file & project files + updated NuGet dependencies

* Updated .net version in pipelines

* Updated .net version in templates

* Update more dependencies

* Fixed ambiguous call to DistinctBy() - part of Umbraco.Extensions and System.Linq

* Disabling the Razor source generators in .NET 6 due to error: "Cannot find the fallback endpoint specified by route values..."

* Fixed unit tests

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-11-18 15:35:42 +01:00
Nikolaj Geisle
6aaa13b385 Merge pull request #11200 from umbraco/v9/feature/implement-IOptionsMonitor-instead-of-IOptions
v9: Implement IOptionsMonitor or IOptionsSnapshot instead of IOptions
2021-10-04 14:01:28 +02:00
Nikolaj Geisle
e11d6ac280 Updated classes to use IOptionsMonitor or IOptionsSnapshot instead of IOptions 2021-09-27 10:32:21 +02:00
Shannon Deminick
5bfab13dc5 Fixes #11189 - protected content not working (#11193)
* Fixes #11189

* Fixes #11183

* Fix test Null_When_No_Content_On_PublishedRequest.

Believe this is reasonable.

* Update src/Umbraco.Web.Website/Routing/PublicAccessRequestHandler.cs

Co-authored-by: Paul Johnson <pmj@umbraco.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-09-26 12:42:27 +02:00
Shannon
c4fdf808d3 Fixes 10730 - Route hijacking with public access 2021-09-21 10:49:45 -06:00
Bjarke Berg
e95a759181 Updated nuget package dependencies 2021-09-20 12:59:14 +02:00
Shannon
9306861d76 Better candidate checking. 2021-09-17 13:49:12 -06:00
Shannon
57bbbfa7d3 better null checks 2021-09-17 13:35:43 -06:00