* Fix: prevent open redirect in public surface controllers by validating RedirectUrl with Url.IsLocalUrl
* Fixed spacing in comment.
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fix: prevent open redirect in public surface controllers by validating RedirectUrl with Url.IsLocalUrl
* Fixed spacing in comment.
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update System.Security.Cryptography.Xml - fix vulnerability
* Update Directory.Packages.props
use correct/latest version of the system.security.cryptohraphy.xml package.
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update System.Security.Cryptography.Xml - fix vulnerability
* Update Directory.Packages.props
use correct/latest version of the system.security.cryptohraphy.xml package.
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Backport #21910 to V13
* Update src/Umbraco.Infrastructure/Search/IndexingNotificationHandler.ContentType.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Backport #21856 as well
* Fix issue where removing a property type wasn't detecting and returning the expected change type.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Removed explicit 260-character path length checks from PhysicalFileSystem.GetFullPath and deleted associated unit tests. Updated tests to focus on path normalization and validity, and improved path assertions for clarity and cross-platform compatibility. No longer enforce or test for legacy Windows path length restrictions.
Fix GetLockoutEnd to return DateTimeOffSet max rather than DateTime max, to align with type of function result and avoid chance of overflow when timezone is minus UTC.
Fix GetLockoutEnd to return DateTimeOffSet max rather than DateTime max, to align with type of function result and avoid chance of overflow when timezone is minus UTC.
* Ensure imported dictionary item is only processed from the expected temporary uploads folder.
* Ensured content type upload input is only a file and not a string that can be interpretted as a file path.
* Amend dictionary import to extract file name and prepend path rather than rely on provided path.
* Tidied usings.
* Ensure file name cannot contain path separator characters.
* Align cursor style and readonly mode for other property editors
* Show disabled actions as in other property editors when readonly
* Disable sortmode as well when readonly
* Formatting
* Ensure delete action remains disabled if readonly
* Ported fix to 13
* Mocking context and cache
* Removing unused parameter in constructor
* Removed a couple of unused variables in the tests.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fix memory leak with IOptionsMonitor.OnChange and non-singleton registered components.
* Added XML docs.
* Apply fix to DeliveryApiContentIndexingNotificationHandler.
* Dispose disposable data editors in ValueEditorCache.
* Removed unnecessary refactoring and clarified code comments.
* Fix memory leak with IOptionsMonitor.OnChange and non-singleton registered components.
* Added XML docs.
* Apply fix to DeliveryApiContentIndexingNotificationHandler.
* Dispose disposable data editors in ValueEditorCache.
* Removed unnecessary refactoring and clarified code comments.
* Do not convert calculated lockedOutUntil time to UTC
* Handle conversion to UTC when we know we have server time values in IdentityMapDefinition for members.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fix: Used FetchByGroups to batch queries to stop SQL limit bug
* Tidied up indentation.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fixed regression with handling of null representation in cache.
* Added integration test to verify behaviour.
* Use helper methods.
* Amend tests so they verify that cached null values are also removed
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Fixed regression with handling of null representation in cache.
* Added integration test to verify behaviour.
* Use helper methods.
* Amend tests so they verify that cached null values are also removed
---------
Co-authored-by: kjac <kja@umbraco.dk>
Prevent RTE being marked as dirty when content containt empty paragraph
In Tinymce, an empty paragraph is marked with a non-breaking space character.
When saving the content, the DOMParser replaces this empty non-breaking space character with an entity.
This causes the editor to always be dirty when the content contains an empty paragraph.
By making these the same befor the comparison, this is prevented.
* Avoid throwing an exception on getting references when migrating content with changed data types.
* Revert and handle exception at the consumer side
* Clean up
* Fix issue 12364
fix bug for Media Picker is slow when you have a large number of images at the root folder #12364
* Revert "Fix issue 12364"
This reverts commit 4d867345eb.
* Media Picker: use getPagedChildren with paging & sorting
Replaces folder view calls to entityResource.getChildren with
entityResource.getPagedChildren in MediaPickerController.
- Adds orderBy/Direction and increases default pageSize to 200
- Resets pagination when entering folders or clearing search
- Updates changePagination to work for both search and folder views
- Keeps legacy behaviour for searchMedia (no breaking server changes)
* Update mediapicker.controller.js
* Update mediapicker.controller.js
* Update mediapicker.controller.js
* Update mediapicker.controller.js
* Fix default values for paging.
* Refactor Media Picker controller: simplify pagination and clarify comments
- Removed unnecessary helper methods (pickPositive / pickNonNegative) and assign pagination values directly,
as backend always provides valid positive/ non-negative numbers.
- Renamed or removed review-only comments to keep codebase clean.
- Clarified purpose of resetting `vm.searchOptions.filter` to explain why the filter is cleared after loading items.
- Adjusted indentation and minor formatting for consistency.
* Media Picker: fix lost paging on reopen by chaining navigation promises
Ensures the Media Picker always loads a paged result when restoring the last
visited folder.
- run(), ensureWithinStartNode(), gotoStartNode(), and gotoFolder() now return
and chain the same promise flow.
- gotoFolder() resolves path → sets current folder → resets pagination →
calls getChildren() (which uses getPagedChildren).
- Fixed cases where reopening the picker showed all items with no pager.
- Kept existing UX: filter is cleared on folder navigation to start unfiltered.
- Minor indentation/formatting cleanups.
* Tidied up indentation.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Ensure values no longer allowed as options in checkbox list configuration are removed from the value, such that they will be removed from the persisted data when saved.
* Allow ContentAtRoot to accept culture
* Update comments about old TypedContentAtRoot
* Remove old method as new is optional parameter
* Change binary breaking change
* Obsolete methods
* Reverted to non-optional overloads.
* Used nullable string.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Allow fetching content by Guid and Udi
* Get media by Guid and Udi ids
* Fix array parameters
Co-authored-by: Ronald Barendse <ronald@barend.se>
---------
Co-authored-by: Ronald Barendse <ronald@barend.se>
* Avoid throwing an exception on getting references when migrating content with changed data types.
* Revert and handle exception at the consumer side
* Clean up
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Support querystring and anchor for local links in Delivery API output
* Add default implementation for backwards compat
* Add default implementation for backwards compat (also on the interface)
* Fix default implementation
* feat: Add Arabic (ar) backoffice translation
* Make Arabic language general until having special words for other
countries.
* Corrected the language header
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Use a regex to filter our invalid culture codes rather than relying on the culture being installed on the operating system.
* Update to more restrictive regex
Co-authored-by: Nuklon <Nuklon@users.noreply.github.com>
---------
Co-authored-by: Nuklon <Nuklon@users.noreply.github.com>
* Fixes#19654
Adds the propertyAlias to the VariationContext so that products implementing the GetSegment method are aware which propertyAlias it's being called for
* Re-implement original variation context for backwards compatibility
* Fixes hidden overload method
Ensures the `GetSegment` method overload is not hidden when a null `propertyAlias` is passed.
* Resolve backward compatibility issues.
* Improved comments.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fix users being able to see nodes they don't have access to when using the picker search
* Readability and naming improvements
* Additional fixes
* Adjust tests
* Additional fixes
* Small improvement
* Replaced the root ids with constants
* Update src/Umbraco.Web.BackOffice/Trees/MemberTreeController.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add integration tests that shows the problem
* Fix the problem and add explenation
* Improved comments slightly to help when we come back here!
Moved tests alongside existing ones related to scopes.
Removed long running attribute from tests (they are quite fast).
* Fixed casing in comment.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add support for programmatic creation of property types providing the data type key.
* Add integration tests
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Adds variation by the header name Accept-Language to the develivery API output cache policy
* Removed obsolete constructor (not necessary as the class is internal).
* Introduce contants for header names.
* Refactor descendant enumeration in DeliveryApiContentIndexHelper
Improved loop condition to allow for processing of more than 10.000 descendants for indexing.
* Add failing test for original issue.
* Renamed variable for clarity.
---------
Co-authored-by: Brynjar Þorsteinsson <brynjar@vettvangur.is>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Preserve word boundaries when indexing RTE content with <br> tags
Replace <br> tags with spaces before HTML stripping to prevent word
concatenation in Examine index. Fixes issue where "John Smith<br>Company ABC"
was indexed as "John SmithCompany ABC" instead of "John Smith Company ABC".
- Add regex to replace <br> variants with spaces in RichTextPropertyIndexValueFactory
- Handles <br>, <br/> with spaces and attributes
- Maintains existing StripHtml() behavior for all other HTML tags
* Added unit test with test cases for expected index values
* Regex tweak to avoid matches on <break> <branything> etc
* Tweaked tests as per PR feedback
* Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/RichTextPropertyIndexValueFactoryTests.cs
Updated tests
Co-authored-by: Kenn Jacobsen <post@kennjacobsen.dk>
* Tweaked test expectations
---------
Co-authored-by: Emma Garland <emma.garland@rocksolidknowledge.com>
Co-authored-by: Emma L Garland <emmagarland77@gmail.com>
Co-authored-by: Kenn Jacobsen <post@kennjacobsen.dk>
* Ensure to delete related tokens when removing logins for removed external login providers.
Ensure to avoid removing logins for members.
* Applied suggestions from code review.
* Removed unnecessary <= check.
* Ensure tag operations are case insensitve on insert across database types.
* Ensure tags provided in a single property are case insensitively distinct when saving the tags and relationships.
* Update src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TagRepository.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Handle case sensitivity on insert with tag groups too.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Removed the check before the wait that threw the recursive lock exception.
Added additional check to ensure we don't release a lock that's already released.
* Removed unnecessary check on releasing the lock.
The MediaService currently locks the ContentTree for GetPagedOfType(s) operations, but it's querying the MediaTree. This ensures we lock the correct tree.
* Optimize the member save as part of the member login process, by-passing locking and audit steps and handling only the expected update properties.
* Added unit test to verify new behaviour.
* Update src/Umbraco.Infrastructure/Security/MemberUserStore.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Updates from code review.
* Improved comments.
* Add state information to notification indicating whether a member is saved via only the update of login properties.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Migaroez <geusens@gmail.com>
* Optimize the member save as part of the member login process, by-passing locking and audit steps and handling only the expected update properties.
* Added unit test to verify new behaviour.
* Update src/Umbraco.Infrastructure/Security/MemberUserStore.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Updates from code review.
* Improved comments.
* Add state information to notification indicating whether a member is saved via only the update of login properties.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Migaroez <geusens@gmail.com>
* Adds support for retrieval of data type references when data type is routed using a GUID.
* Fixed typos in comments.
* Use IIdKeyMap to resolve ID instead of fetching datatype
* Use IDKeyMap instead
---------
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
* Make sure that each optional section of the cachekey always starts and ends with a -
* Move secondary logic of clearing the membercaches into its own replacable class
* Regsiter the new implementation
* Add a mock to the integration tests as appCaches are disabled
* Added header comments to components.
* Refactored cache key into a method and exposed for testing.
Added unit tests to verify behaviour.
* Verified also that regex matches only the supplied member and asserted on the key itself.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Backport user enumeration fix.
* Bump gitversion.
* Remove full path details from exception when requesting a path outside of the physical file system's root.
* Adds randomness to failed login duration.
* Handle file paths as not found in delivery API by route requests.
* Move check earlier to handle redirect logic as well.
* Spelling: Changed "resolveable" to "resolvable"
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Fixed parsing of node if in content and media permission querystring handlers to retrieve expected value when multiple are provided in the querystring.
* Add HttpPost attributes to backoffice endpoints that should only accept post requests.
* Bumped version to 13.6.1.
* Narrow PermissionQueryString parsing to the releveant UmbracoObjectType
* Add missed update from v10
---------
Co-authored-by: Sven Geusens <sge@umbraco.dk>
* Introduce publishNotifications method on IMembershipMemberService.cs
* Fix test
* Add PublishNotificationSaveOptions
* Fix up according to comments
* Use numeric values for flag enum
* Update src/Umbraco.Core/Services/MemberService.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Core/Services/MemberService.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Backport use of thread delay over sleep and handle dispose in FileSystemMainDomLock (from PRs #18119 and #18147)
* Applied suggestion from code review.
* Add validation to prevent update of a user or member to an invalid username.
* Avoid password manager updates of user name field on user details screen.
* init
* Aligned default values on security settings.
* Added validator for security settings.
* Provide default implementation for get members by email.
* Refactored constructor of MemberController.
* Validate on unique member email only when configured to do so.
* Further code tidy and use of DI in constructor.
* Used new constructor in tests.
* Add unit test for modified behaviour.
* Removed validator for security settings (it's not necessary, I got confused with users and members).
* Spelling.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add CacheNullValues option to RepositoryCachePolicy
* Cache null values in DictionaryByKeyRepository
* Fixed issue with nullable reference.
* Updated logic for caching of null values.
* Update src/Umbraco.Infrastructure/Cache/DefaultRepositoryCachePolicy.cs
Co-authored-by: Sven Geusens <geusens@gmail.com>
* Made the NullValueRepresentation overwritable in a generic manner
* Improve generic NullValueCachePolicyResolver
* Revert Commits and clarify logic with comment
This reverts commit 8befb43792 "Improve generic NullValueCachePolicyResolver"
Also reverts 8adf0a2 - Made the NullValueRepresentation overwritable in a generic manner
And 8adf0a2 - Made the NullValueRepresentation overwritable in a generic manner
* Update src/Umbraco.Infrastructure/Cache/DefaultRepositoryCachePolicy.cs
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Sven Geusens <geusens@gmail.com>
Co-authored-by: Sven Geusens <sge@umbraco.dk>
* Set Smidge cachebuster type
* Amend exception and fix typo
* Minor tweak to comment and exception message.
---------
Co-authored-by: Simon Hartfield <simon.hartfield@googlemail.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Flow additional identities to new principal
* Add extension to more easily get member identity
* Ensure the member is used instead of the backoffice user in `MemberManager`
* Update snippet
* Fix the comment that I broke
* Update src/Umbraco.Web.Common/Extensions/MemberClaimsPrincipalExtensions.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Only fetch single commit
* Hopefully fixes Nerdbank.GitVersioning.GitException: Shallow clone lacks the objects required to calculate version height. Use full clones or clones with a history at least as deep as the last version height resetting change.
* Do not checkout again
* More test pipeline
* Another attempt
* yet another attempt
* more attempts
* Revert "more attempts"
This reverts commit 5694d97ba6.
* Test without building backoffice and login explicitly
* Fix mem leak in integration tests
* Fixes sqlserver lock test
# Conflicts:
# build/azure-pipelines.yml
* Don't save invalid media
* Revert "Don't save invalid media"
This reverts commit c4b6acf542.
* Still allow save, but show validation error, not popup error
* Add clarifying comment
* Refactor to use IWebhostEnvironment for wwwroot files.
* Obsolete ctor
* Add ActivatorUtiiliesConstructor
* Refactor logic to include folders
* Fix so we can see files in wwwroot/App_Plugins
* Cosmetic: Use invariant comparison for the "umbraco" folder".
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Refactor to use IWebhostEnvironment for wwwroot files.
* Obsolete ctor
* Add ActivatorUtiiliesConstructor
* Refactor logic to include folders
* Fix so we can see files in wwwroot/App_Plugins
* Cosmetic: Use invariant comparison for the "umbraco" folder".
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Update nuget packages
* Cherry pick fixes from v15
* Fixed: Projects that use central package version management should not define the version on the PackageReference items but on the PackageVersion items
* rollback update in tool
* Revert #14234
* Make the boot failure message more descriptive when unable to connect to DB
* Update src/Umbraco.Infrastructure/Runtime/RuntimeState.cs
Co-authored-by: Ronald Barendse <ronald@barend.se>
* Revert changes
* Obsolete InstallMissingDatabase from V16
---------
Co-authored-by: Ronald Barendse <ronald@barend.se>
* Dropzone, upload complete callback with processed file array
* Media card: cosmetic fix for image border-radius
The image's square corners were poking out.
* Distinguish between default value and initial zero
* Update special value comment documentation
* Redid solution with dirty/new entity tracking
* rework copy branch sortorder fix
* Change == false to is false
---------
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Add missing backoffice languages as properties etc. are translated via translation section (e.g. with "#Backoffice Settings"). At the moment the swiss languages always need to be added via the umbraco/Config folder.
* build(deps): update @umbraco-ui/uui from 1.7.1 to 1.11.0
* fix: umb-login-element no attributes
Cherry-picked a fix from V14 where the custom login input component was no longer needed, which was fixed because it errors out. This simplifies the login form.
* cherry-pick code to handle 'enter' click from v14
* Add ContentCache test
* Use SemaphoreSlim as write lock
* Apply lock imrpovements to SnapDictionary
* Obsolete unused MonitorLock
(cherry picked from commit c3db3457e7)
* Added a custom RichTextRequiredValidator, to check that the empty richtext object (still with json) can be required or not. We are now testing the markdown needs to have a value
* Fixed namespaced and moved back wrong class
* Cleanup
* Find the constraint name based on table,column,type name instead of hardcoding it
* removed unnecesary using
* Check constraint rename seperatly from column rename
* Combining OpenId and OfflineAccess scope
When the client scope is set to "openid offline_access", the returned scope only has the "offline_access" scope. The "openid" scope and the "id_token" are missing. By combining the OpenId and OfflineAccess as return scope, the refresh_token and id_token are returned.
* Update MemberController.cs
Cleaner way, provided by @kjac, to check if the scope has openid and/or offiline_access set.
(cherry picked from commit 55f9b09ab7)
* Improve migration performance
* Fix PR review comments
* Revert tags migration for sql lite as the optimized sql doesn't work properly and sqlLite datasets should not be large anyway
* Removing override of OnTransformingIndexValues from DeliveryApiContentIndex
* Making sure that TransformingIndexValues event is raised for DeliveryApiContentIndex without performing the special index value transformations
* Review suggestion
* Adds url support for x.com/.*/status/.*
* Updated regex
* Obsoleting Twitter as OEmbedProvider
* Introducing X as its new alternative
* Adding X and removing Twitter from EmbedProvidersCollection
* Typo
* Do not execute query if no macros found
* Request cache the permission lookup
* Unbreak change by adding obsolete ctor
* Clean up
* Wrap indexing for delivery API in a scope
* Do not ask options every time for the timeout, instead listen for updates
* Lookup content types once instead of one by one
* Use TryGetValue instead
* Do a distinct on user ids before building index, to avoid issue with more than 2100 parameters
* Don't map ContentDto (it's unused)
* Introduce request bound block editor element cache
---------
Co-authored-by: kjac <kja@umbraco.dk>
* 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)
* 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
* 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
* 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
* Ported over #15928 changes for 13.3 RC
* Use GetOrAdd()
* Lock dictionary initialization
---------
Co-authored-by: Jason Elkin <jasonelkin86@gmail.com>
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
* Apply focusLockService to TourStepDirective
Apply focusLockService to TourStepDirective in order to ensure that
non-modal page contents are inert and do not interfere with focus on
modal dialog with regards to screen reading technologies.
* Add properties to umb-tour.html.
Add properties to umb-tour html page to ensure that it aligns with modal
dialog best practices.
* Add dialog properties to Umbraco tour .html files.
Add properties relating to dialog and accessibility to the Umbraco tour
.html files, including aria-label, role, and tab index.
A new check for ContentVariation.Nothing is necessary when copying from
documents to ensure that if there is no content variation as defined by
the Nothing property, values are still copied even if variation is not
supported since the content itself will not vary.
* Prevent user populated link names being removed
When selecting a node in a link picker, the "name" (Link title) field is always overridden with the selected node's name.
This change prevents the field from being overridden if it is user populated.
* Don't update for media either
If there is already a name, don't update when selecting media
* Deselect current node
When selecting media, deselect current node if there is one
* Change to suggested functionality
Update to more elaborate functionality which will always use the *current* node name. i.e If you change the node name then the link picker name changes also.
* Reapply changes
Repply changes after merge from contrib branch
* Use IsCulturePublished() and only track node name
* Fallback to node name in preview
* Fix setting media name
---------
Co-authored-by: Ronald Barendse <ronald@barend.se>
This ensures keys are correctly assumed to be unique => safe for dictionary usage
Co-authored-by: Sven Geusens <sge@umbraco.dk>
(cherry picked from commit e267b41575)
* Added ExecuteNonQuery(DbCommand command) on database to ensure we call OnExecutingCommand and OnExecutedCommand when executing DbCommands
* Added Cache Instructions lock, to avoid deadlocks
* Optimized read locks for nucache when only one content type is rebuilt
* Optimized the SqlServer locks, so only one command is executed (and thereby roundtrip) per lock instead of two
* Avoid breaking changes
* Cosmetic changes
* Take locks if everything is rebuild
* Use same lock in scopes, to avoid potential deadlocks between the two
* Use eager locks in PublishedSnapshotService.cs
* Added timeouts to some of the application locks
* Revert "Use eager locks in PublishedSnapshotService.cs"
This reverts commit 01873aae97.
* Revert "Added Cache Instructions lock, to avoid deadlocks"
This reverts commit e3fca7c12a.
* Use single readlock call to lock many
* Use eager locks for reads
* Eager write locks
* Ignore test of lazy locks
* Unique timeout exception messages
---------
Co-authored-by: kjac <kja@umbraco.dk>
(cherry picked from commit 2c23e67c65)
* Added ExecuteNonQuery(DbCommand command) on database to ensure we call OnExecutingCommand and OnExecutedCommand when executing DbCommands
* Added Cache Instructions lock, to avoid deadlocks
* Optimized read locks for nucache when only one content type is rebuilt
* Optimized the SqlServer locks, so only one command is executed (and thereby roundtrip) per lock instead of two
* Avoid breaking changes
* Cosmetic changes
* Take locks if everything is rebuild
* Use same lock in scopes, to avoid potential deadlocks between the two
* Use eager locks in PublishedSnapshotService.cs
* Added timeouts to some of the application locks
* Revert "Use eager locks in PublishedSnapshotService.cs"
This reverts commit 01873aae97.
* Revert "Added Cache Instructions lock, to avoid deadlocks"
This reverts commit e3fca7c12a.
* Use single readlock call to lock many
* Use eager locks for reads
* Eager write locks
* Ignore test of lazy locks
* Unique timeout exception messages
---------
Co-authored-by: kjac <kja@umbraco.dk>
(cherry picked from commit 2c23e67c65)
* Added ExecuteNonQuery(DbCommand command) on database to ensure we call OnExecutingCommand and OnExecutedCommand when executing DbCommands
* Added Cache Instructions lock, to avoid deadlocks
* Optimized read locks for nucache when only one content type is rebuilt
* Optimized the SqlServer locks, so only one command is executed (and thereby roundtrip) per lock instead of two
* Avoid breaking changes
* Cosmetic changes
* Take locks if everything is rebuild
* Use same lock in scopes, to avoid potential deadlocks between the two
* Use eager locks in PublishedSnapshotService.cs
* Added timeouts to some of the application locks
* Revert "Use eager locks in PublishedSnapshotService.cs"
This reverts commit 01873aae97.
* Revert "Added Cache Instructions lock, to avoid deadlocks"
This reverts commit e3fca7c12a.
* Use single readlock call to lock many
* Use eager locks for reads
* Eager write locks
* Ignore test of lazy locks
* Unique timeout exception messages
---------
Co-authored-by: kjac <kja@umbraco.dk>
(cherry picked from commit 2c23e67c65)
Default behavior:
If you have only one available module for an area Umbraco will
open a dialog for adding the module. If you have more than one
module you will get a dialog to choose a module and that dialog
will have a Paste option in the top right corner.
New behavior:
If there is a module in the clipboard, Umbraco will open a dialog
with the Paste option even thou there is only one available module
in the area. In other cases, it will work as usual.
Reported issue: https://github.com/umbraco/Umbraco-CMS/issues/15755
<!-- Both OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer bring in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens -->
<!-- Both OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer bring in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens -->
:thrownewArgumentException($"Invalid item type. This method can only be used with item type {nameof(PublishedItemType.Content)}, got: {content.ItemType}");
:thrownewInvalidOperationException("Could not retrieve the current member. This method should only ever be invoked when a member has been authorized.");
=>$"{domainAndUri.ContentId}{DomainUtilities.PathRelativeToDomain(domainAndUri.Uri, contentRoute.LocalPath)}";// Use LocalPath over AbsolutePath to keep the path decoded.
<!-- Both OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer bring in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens -->
varrowsAffected=awaitdbContext.Database.ExecuteSqlAsync(@$"UPDATE umbracoLock WITH (REPEATABLEREAD) SET value = (CASE WHEN (value=1) THEN -1 ELSE 1 END) WHERE id={LockId}");
#pragmawarningdisableEF1002
varrowsAffected=awaitdbContext.Database.ExecuteSqlRawAsync(@$"SET LOCK_TIMEOUT {(int)_timeout.TotalMilliseconds};UPDATE umbracoLock WITH (REPEATABLEREAD) SET value = (CASE WHEN (value=1) THEN -1 ELSE 1 END) WHERE id={LockId}");
@@ -127,10 +127,16 @@ internal class EFCoreScope<TDbContext> : CoreScope, IEfCoreScope<TDbContext>
Locks.ClearLocks(InstanceId);
if(ParentScopeisnull)
// Since we can nest EFCoreScopes in other scopes derived from CoreScope, we should check whether our ParentScope OR the base ParentScope exists.
// Only if neither do do we take responsibility for ensuring the locks are cleared.
// Eventually the highest parent will clear the locks.
// Further, these locks are a reference to the locks of the highest parent anyway (see the constructor of CoreScope).
#pragmawarningdisableSA1100// Do not prefix calls with base unless local implementation exists (justification: provides additional clarify here that this is defined on the base class).
if(ParentScopeisnull&&base.HasParentScopeisfalse)
{
Locks.EnsureLocksCleared(InstanceId);
}
#pragmawarningrestoreSA1100// Do not prefix calls with base unless local implementation exists
<!-- Both OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer bring in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens -->
@@ -48,6 +48,13 @@ public static class AppCacheExtensions
returndefault;
}
// If we've retrieved the specific string that represents null in the cache, return it only if we are requesting it (via a typed request for a string).
@@ -59,6 +66,18 @@ public static class AppCacheExtensions
returndefault;
}
// If we've retrieved the specific string that represents null in the cache, return it only if we are requesting it (via a typed request for a string).
// This specific cache key was introduced to fix an issue where the member username could not be the same as the member id, because the cache keys collided.
// This is done in a bit of a hacky way, because the cache key is created internally in the repository, but we need to clear it here.
// Ideally, we want to use a shared way of generating the key between this and the repository.
// Additionally, the RepositoryCacheKeys actually caches the string to avoid re-allocating memory; we would like to also use this in the repository
"ReSharperTestRunner","ReSharperTestRunner32","ReSharperTestRunner64",// These are used by the Jetbrains Rider IDE and Visual Studio ReSharper Extension
"ReSharperTestRunner","ReSharperTestRunner32","ReSharperTestRunner64","ReSharperTestRunnerArm32","ReSharperTestRunnerArm64",// These are used by the Jetbrains Rider IDE and Visual Studio ReSharper Extension
@@ -1469,6 +1469,7 @@ Mange hilsner fra Umbraco robotten
<keyalias="publishWithMissingDomain">Der er ikke noget domæne konfigureret for %0%, kontakt vensligst en
administrator, se loggen for mere information
</key>
<keyalias="publishWithNoUrl">Dokumentet har ikke nogen URL, muligvis grundet en kollision med et andet dokuments navn. Flere detaljer kan ses under Info.</key>
<keyalias="copySuccessMessage">Dit systems information er blevet kopieret til udklipsholderen</key>
<keyalias="cannotCopyInformation">Kunne desværre ikke kopiere dit systems information til udklipsholderen</key>
<keyalias="nestedContentDeleteAllItems">Are you sure you want to delete all items?</key>
<keyalias="nestedContentDeleteItem">Are you sure you want to delete this item?</key>
<keyalias="nestedContentNoContentTypes">No Content Types are configured for this property.</key>
<keyalias="nestedContentAddElementType">Add Element Type</key>
<keyalias="nestedContentSelectElementTypeModalTitle">Select Element Type</key>
@@ -329,6 +332,7 @@
<keyalias="schedulePublishHelp">Select the date and time to publish and/or unpublish the content item.</key>
<keyalias="createEmpty">Create new</key>
<keyalias="createFromClipboard">Paste from clipboard</key>
<keyalias="removeItem">Remove item</key>
<keyalias="nodeIsInTrash">This item is in the Recycle Bin</key>
<keyalias="noProperties">No content can be added for this item</key>
<keyalias="variantSaveNotAllowed">Save is not allowed</key>
@@ -1700,6 +1704,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<keyalias="publishWithMissingDomain">There is no domain configured for %0%, please contact an administrator, see
log for more information
</key>
<keyalias="publishWithNoUrl">The document does not have a URL, possibly due to a naming collision with another document. More details can be found under Info.</key>
<keyalias="copySuccessMessage">Your system information has successfully been copied to the clipboard</key>
<keyalias="cannotCopyInformation">Could not copy your system information to the clipboard</key>
<keyalias="webhookSaved">Webhook saved</key>
@@ -3077,7 +3082,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<keyalias="detailedLevelDescription"><![CDATA[We will send:
<ul>
<li>Anonymized site ID, Umbraco version, and packages installed.</li>
<li>Number of: Root nodes, Content nodes, Macros, Media, Document Types, Templates, Languages, Domains, User Group, Users, Members, Backoffice external login providers, and Property Editors in use.</li>
<li>Number of: Root nodes, Content nodes, Macros, Media, Document Types, Property Types, Compositions, Templates, Languages, Domains, User Group, Users, Members, Backoffice external login providers, Webhooks, rich text datatypes, blocks used in rich text datatypes, and Property Editors in use.</li>
<li>System information: Webserver, server OS, server framework, server OS language, and database provider.</li>
<li>Configuration settings: Modelsbuilder mode, if custom Umbraco path exists, ASP environment, whether the delivery API is enabled, and allows public access, and if you are in debug mode.</li>
<![CDATA[<a href="https://docs.umbraco.com/umbraco-cms/fundamentals/data/scheduled-publishing#timezones" target="_blank" rel="noopener">What does this mean?</a>]]></key>
<keyalias="nestedContentDeleteItem">Are you sure you want to delete this item?</key>
<keyalias="nestedContentDeleteAllItems">Are you sure you want to delete all items?</key>
<keyalias="nestedContentDeleteItem">Are you sure you want to delete this item?</key>
<keyalias="nestedContentEditorNotSupported">Property %0% uses editor %1% which is not supported by Nested
Content.
</key>
@@ -328,6 +331,7 @@
<keyalias="schedulePublishHelp">Select the date and time to publish and/or unpublish the content item.</key>
<keyalias="createEmpty">Create new</key>
<keyalias="createFromClipboard">Paste from clipboard</key>
<keyalias="removeItem">Remove item</key>
<keyalias="nodeIsInTrash">This item is in the Recycle Bin</key>
<keyalias="variantSaveNotAllowed">Save is not allowed</key>
<keyalias="variantPublishNotAllowed">Publish is not allowed</key>
@@ -1732,6 +1736,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<keyalias="publishWithMissingDomain">There is no domain configured for %0%, please contact an administrator, see
log for more information
</key>
<keyalias="publishWithNoUrl">The document does not have a URL, possibly due to a naming collision with another document. More details can be found under Info.</key>
<keyalias="preventCleanupEnableError">An error occurred while enabling version cleanup for %0%</key>
<keyalias="preventCleanupDisableError">An error occurred while disabling version cleanup for %0%</key>
<keyalias="copySuccessMessage">Your system information has successfully been copied to the clipboard</key>
@@ -2035,7 +2040,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
<keyalias="webhookKey">Webhook key</key>
<keyalias="retryCount">Retry count</key>
<keyalias="toggleDebug">Toggle debug mode for more information.</key>
<keyalias="statusNotOk">Not OK status code</key>
<keyalias="statusNotOk">Not OK status code</key>
<keyalias="urlDescription">The url to call when the webhook is triggered.</key>
<keyalias="eventDescription">The events for which the webhook should be triggered.</key>
<keyalias="contentTypeDescription">Only trigger the webhook for a specific content type.</key>
@@ -3096,7 +3101,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
We will send:
<ul>
<li>Anonymized site ID, Umbraco version, and packages installed.</li>
<li>Number of: Root nodes, Content nodes, Macros, Media, Document Types, Templates, Languages, Domains, User Group, Users, Members, Backoffice external login providers, and Property Editors in use.</li>
<li>Number of: Root nodes, Content nodes, Macros, Media, Document Types, Property Types, Compositions, Templates, Languages, Domains, User Group, Users, Members, Backoffice external login providers, Webhooks, rich text datatypes, blocks used in rich text datatypes, and Property Editors in use.</li>
<li>System information: Webserver, server OS, server framework, server OS language, and database provider.</li>
<li>Configuration settings: Modelsbuilder mode, if custom Umbraco path exists, ASP environment, whether the delivery API is enabled, and allows public access, and if you are in debug mode.</li>
<keyalias="returnToPreviewDescription">Du har avslutat förhandsvisningsläge, vill du aktivera det igen för att se senast sparade version av webbplatsen?</key>
<keyalias="returnToPreviewAcceptButton">Förhandsvisa senaste version</key>
<keyalias="viewPublishedContentDescription">Du visar webbplats i förhandsvisningsläge, vill du avsluta förhandsvisning och visa senaste publicerad version av webbplatsen?
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.