Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Umbraco.Core/Services/FileServiceOperationBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ protected async Task<TOperationStatus> HandleDeleteAsync(string path, Guid userK

protected async Task<Attempt<TEntity?, TOperationStatus>> HandleCreateAsync(string name, string? parentPath, string? content, Guid userKey)
{
if (name.Contains("/"))
{
return Attempt.FailWithStatus<TEntity?, TOperationStatus>(InvalidName, default);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reckon we need this both here and in HandleRenameAsync?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 😁


using ICoreScope scope = ScopeProvider.CreateCoreScope();

var path = GetFilePath(parentPath, name);
Expand Down