Commit Graph

42 Commits

Author SHA1 Message Date
Nicklas Kramer
2a6bb64c78 V17 - Properties and validators, removing obsoleted code (#19961)
* Removing obsoleted code from ApiMediaQueryService.cs

* Removing obsoleted code from ApiRichTextMarkupParserTests.cs

* Removing obsoleted code from ContentCacheRefresher.cs

* Removing obsoleted code from ContentFinderByUrlAlias.cs and adjusting its tests to use the new logic

* Removing obsoleted code from ContentFinderByUrl.cs & its dependencies

* Removing obsoleted code from ApiRichTextMarkupParserTests.cs

* Removing obsoleted code from DocumentCache.cs & its dependencies

* Removing obsoleted code from MediaCache.cs & its dependencies

* Removing obsoleted code from PublishedCacheBase.cs & its dependencies

* Removing obsoleted code from RenderNoContentController.cs and its tests

* Removing obsoleted code from UmbracoRouteValueTransformer.cs

* Removing obsoleted constructors from DefaultUrlProvider.cs

* Removing the RadioValueEditor.cs & RadioValueValidator.cs obsoleted classes.

* Removing obsolete constructor from MultipleValueValidator.cs

* Removing obsolete constructor from EmailValidator.cs

* Removing obsoleted code from DataValueReferenceFactoryCollection.cs

* Removing obsoleted code from ApiContentBuilderBase.cs

* Fixing constructor missing attribute

* Making use of the TryGet result

* Fixing use of obsoleted constructor

* Removing silly bookmark comment

* Fixing deleted code and restructuring to use new cache

* Making use of TryGetRootKeys bool, to return null if false.

* Extending code to use new constructor

* Updated PublishedContentQuery.cs to return empty array

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2025-08-26 11:31:27 +00:00
Sven Geusens
d2a0cba933 V16 cherry pick of member partial cache invalidator see #19314 (#19459)
* v16 cherry pick of member partial cache invalidator see #19314

# Resolved merge conflic in src/Umbraco.Core/Cache/Refreshers/Implement/MemberCacheRefresher.cs

* Take nullmember cacheitems into account
2025-06-02 14:52:38 +02:00
Emma L Garland
862820c6a6 Resolved more warnings, and marked more warning types as errors (#16990)
* Fix warnings SA1111, SA1028, SA1500, IDE1270  in Umbraco.Web.Website, and updated rules.

* Remove warnings: IDE0270: Null check can be simplified

* More SqlServer project warnings resolved

* CS0105 namespace appeared already

* Suppress warning until implementation:

#pragma warning disable CS0162 // Unreachable code detected
#pragma warning disable CS0618 // Type or member is obsolete

CS0162 remove unreachable code
SA1028 remove trailing whitespace
SA1106 no empty statements
CS1570 malformed XML
CS1572 corrected xml parameter
CS1573 param tag added
IDE0007 var not explicit
IDE0008 explicit not var
IDE0057 simplify substring
IDE0074 compound assignment
CA1825 array.empty

Down to 3479 warnings
2024-09-10 15:17:29 +01:00
Nikolaj Geisle
a4a9a274bb V14: Merge 13 to 14 (#16340)
* Updates JSON schema for Umbraco 10 with latest references for Forms and Deploy (#15918)

* Ported over #15928 changes for 13.3 RC (#16023)

* Ported over #15928 changes for 13.3 RC

* Use GetOrAdd()

* Lock dictionary initialization

---------

Co-authored-by: Jason Elkin <jasonelkin86@gmail.com>

* Make the API content response builder extendable (#16056)

* Make the API content response builder extendable

* DeliveryApiJsonTypeResolver needs to be extendable too

* bump rc to regular

* Bump to next minor

* Add blocks in RTE telemetry (#16104)

* Add blocks telemetry

* Use constants and update tests

* V13: Add property type information to telemetry (#16109)

* Add property type counts to telemetry

* Use constants and fix tests

* Update description

* V10: Fix for fallback file upload (#14892) (#15868)

* Fix for fallback file upload (#14892)

* Added check for file type

* Removed unneeded null checks and fixed tabs

* Cleaning

* Cleanups, cleanups, and removal of unneeded null checks

* Reverted removal of relationshipservice

* Revert null check removals (too risky)

---------

Co-authored-by: Ambert van Unen <AvanUnen@ilionx.com>
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>

(cherry picked from commit 0b5d1f8aa6)

* Fix up formatting

---------

Co-authored-by: Ambert van Unen <ambertvu@gmail.com>

* Implementors using Umbraco.Tests.Integration won't have to override GetLocalizedTextService

(cherry picked from commit b0016687eb)
(cherry picked from commit 2bb56f1b81)

* Fix logic for retrieving lastKnownElement

(cherry picked from commit cae106bfe8)

* bump version

* Bump version

* Bump version

* Since v13 properties can sometimes be of type IRichTextEditorIntermediateValue - this was unexpected in the XPath navigator code (#16121)

* Webhook log improvements (#16200)

* fix: include all headers in webhook log

* feat: return webhook log status from server

* feat: make webhook logs deep linkable

* feat: add webhook log pagination

* feat: improve webhook request/response body preview

* V13: Optimize custom MVC routing (#16218)

* Introduce EagerMatcherPolicy to conditionally bypass content routing

* Ensure that the candidate we disable dynamic routing for is valid

* Skip Umbraco endpoints

* Simplify logic a bit

* Move install logic to matcher

* Ensure that dynamic routing is still skipped when in upgrade state

* Fixup comments

* Reduce nesting a bit

* Don't show maintenance page when statically routed controllers are hít

* Remove excess check, since installer requests are statically routed

* V13: Optimize custom MVC routing (#16218)

* Introduce EagerMatcherPolicy to conditionally bypass content routing

* Ensure that the candidate we disable dynamic routing for is valid

* Skip Umbraco endpoints

* Simplify logic a bit

* Move install logic to matcher

* Ensure that dynamic routing is still skipped when in upgrade state

* Fixup comments

* Reduce nesting a bit

* Don't show maintenance page when statically routed controllers are hít

* Remove excess check, since installer requests are statically routed

(cherry picked from commit ba9ddd11da)

* Property source level variation should only be applied when configured (#16270)

* Property source level variation should only be applied when configured (#16270)

(cherry picked from commit ab32bac5d9)

* Merge pull request from GHSA-j74q-mv2c-rxmp

* Merge pull request from GHSA-j74q-mv2c-rxmp

* Merge pull request from GHSA-j74q-mv2c-rxmp

* Fix up after merge

* Remove obselete test

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Jason Elkin <jasonelkin86@gmail.com>
Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Ambert van Unen <ambertvu@gmail.com>
Co-authored-by: Lars-Erik <lars-erik@aabech.no>
Co-authored-by: Joshua Daniel Pratt Nielsen <jdpnielsen@gmail.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Rasmus John Pedersen <mail@rjp.dk>
2024-05-22 12:05:41 +02:00
Bjarke Berg
de6e9aeb31 Prioritise surface controller requests highest (#13919)
* Fixed issue mentioned in https://github.com/umbraco/Umbraco-CMS/issues/13836

Now surface controller requests always has higher priority than other. So if this is both a surface controller request and a virtual page request, it will execute the surface controller.

* Moved some login into private methods

* More clean up

* Clean up

* Only handle valid candidates
2023-03-08 13:43:35 +01:00
Bjarke Berg
884793f729 Added fix to maintenance page so it is shown before the content cache is created. (#13767) 2023-02-05 16:47:09 +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
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
Nikolaj Geisle
7994f5c326 Add nullability to Web.Website, Sqlite & SqlServer 2022-04-04 14:47:54 +02: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
Shannon
c4fdf808d3 Fixes 10730 - Route hijacking with public access 2021-09-21 10:49:45 -06:00
Shannon
d27dc05f32 Return null from UmbracoRouteValueTransformer when there is no matches, use a custom IEndpointSelectorPolicy to deal with 404s. 2021-09-17 12:02:04 -06:00
Shannon
494c9f1b42 UmbracoRouteValueTransformer fixes 2021-09-17 10:29:24 -06:00
Bjarke Berg
7859798e8b Move basic auth to website part 2021-08-06 11:37:10 +02:00
Bjarke Berg
28b0e108e4 Update src/Umbraco.Web.Website/DependencyInjection/UmbracoBuilderExtensions.cs 2021-07-07 14:51:05 +02:00
Warren Buckley
b177c1ba12 Further Simplification of IOptions 2021-07-07 13:07:01 +01:00
Warren Buckley
8d936c08da Change RenderController defautl type to be swapped out using the .NETCore options pattern 2021-07-07 12:52:02 +01:00
Shannon Deminick
a1624d26a3 Implements Public Access in netcore (#10137)
* Getting new netcore PublicAccessChecker in place

* Adds full test coverage for PublicAccessChecker

* remove PublicAccessComposer

* adjust namespaces, ensure RoleManager works, separate public access controller, reduce content controller

* Implements the required methods on IMemberManager, removes old migrated code

* Updates routing to be able to re-route, Fixes middleware ordering ensuring endpoints are last, refactors pipeline options, adds public access middleware, ensures public access follows all hops

* adds note

* adds note

* Cleans up ext methods, ensures that members identity is added on both front-end and back ends. updates how UmbracoApplicationBuilder works in that it explicitly starts endpoints at the time of calling.

* Changes name to IUmbracoEndpointBuilder

* adds note

* Fixing tests, fixing error describers so there's 2x one for back office, one for members, fixes TryConvertTo, fixes login redirect

* fixing build

* Fixes keepalive, fixes PublicAccessMiddleware to not throw, updates startup code to be more clear and removes magic that registers middleware.

* adds note

* removes unused filter, fixes build

* fixes WebPath and tests

* Looks up entities in one query

* remove usings

* Fix test, remove stylesheet

* Set status code before we write to response to avoid error

* Ensures that users and members are validated when logging in. Shares more code between users and members.

* Fixes RepositoryCacheKeys to ensure the keys are normalized

* oops didn't mean to commit this

* Fix casing issues with caching, stop boxing value types for all cache operations, stop re-creating string keys in DefaultRepositoryCachePolicy

* bah, far out this keeps getting recommitted. sorry

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-04-20 07:11:45 +02:00
Shannon
8ea88a980a Fixes anti-forgery, fixes tempdata, adds front-end security/identity, gets member macro snippets and controllers all working, removes old code, adds more props to the member identity 2021-04-09 15:24:12 +10:00
Shannon
6148336d04 Adds new event so we know when umbraco routes a value, ensure the IUmbracoWebsiteSecurity is initialized for front-end requests, cleans up some of the routing middleware, adds lots of notes 2021-03-01 12:51:07 +11:00
Mole
b74abaf3af Align namespaces in DependencyInjection to Umbraco.Cms.Infrastructure.DependencyInjection
Even though Core also has this, then pretty much every project has their own DI namespace, and this one does reference third party dependencies as far as I can see
2021-02-12 10:41:07 +01:00
Mole
eb03671b52 Align namespaces in Umbraco.Web.Website 2021-02-10 14:30:14 +01:00
Mole
55aa2edb72 Align namespaces in Umbraco.Web.Common 2021-02-10 11:42:04 +01:00
Mole
ade00997bc Adjust namespace in Umbraco.ModelsBuilder.Embedded 2021-02-10 10:34:27 +01:00
Mole
216fb87c79 Rename Umbraco.Core namespace to Umbraco.Cms.Core 2021-02-09 10:22:42 +01:00
Shannon
0c26a82489 Changes the umbraco route values to use http features intead of in route values which is much nicer, fixes the redirect to page result, tests a surface controller POST and it works, ensures the routing takes place before the form check, removes a bunch of old code 2021-02-03 15:47:27 +11:00
Shannon
c024db9d3c gets surface controllers and front-end api controllers auto-routed, adds tests 2021-02-02 14:48:01 +11:00
Shannon
2a41cec263 Ensures the default PublishedModelFactory is always registered. Ensures AddModelsBuilder is done when adding the website (not required for the back office). 2021-02-01 16:53:24 +11:00
Shannon
7f1e711481 committing changes, notes, etc... so far 2021-01-14 23:14:35 +11:00
Shannon
d1df6c4719 less allocations with AbsolutePathDecoded. removes more aspx checks, adds UmbracoRouteValueTransformerTests, adds interface for IRoutableDocumentFilter 2021-01-13 11:08:48 +11:00
Shannon
f8033c5281 Moves RoutableDocumentFilter along with tests 2021-01-08 15:27:07 +11:00
Shannon
bc6768101e Splits up UmbracoRouteValueTransformer and trying to figure out this hijacked route conundrum with no template :( 2021-01-08 02:10:13 +11:00
Shannon
333479666c removes ResponseStatusDescription and others that aren't used, ports the not found handler, ports redirects, headers, etc... 2021-01-06 20:03:49 +11:00
Shannon
a126977a4e Simplifies how view locations are determined
AB#9720
2021-01-04 15:43:30 +11:00
Shannon
34427b0104 Moves AddDistributed cache back to being called implicitly, ensures notification handlers are not added twice 2021-01-04 13:22:29 +11:00
Shannon
d46545faa0 For now, we explicitly require AddDistributedCache in Startup so it's not called twice. 2021-01-04 13:01:49 +11:00
Shannon
1a0d961e42 removes WebsiteComposer, BackOfficeComposer 2020-12-24 18:11:16 +11:00
Shannon
e785ac28a3 Moves more services and registrations "up", removes AspNetCoreComposer logic and moves to AddWebComponents 2020-12-24 14:29:26 +11:00
Shannon
d5a19530f3 Fixing tests, more DependencyInjection namespace 2020-12-23 13:06:22 +11:00
Shannon
696dd0b8dc removes partial keyword 2020-12-23 12:11:38 +11:00
Shannon
e62edc7bef missing file 2020-12-23 12:02:23 +11:00