Browse Source

CmsKit - Add missing Checks in CommentsManager

pull/7923/head
enisn 5 years ago
parent
commit
96e84af31b
  1. 6
      modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/CommentManager.cs

6
modules/cms-kit/src/Volo.CmsKit.Domain/Volo/CmsKit/Comments/CommentManager.cs

@ -1,4 +1,5 @@
using JetBrains.Annotations;

using JetBrains.Annotations;
using System;
using System.Threading.Tasks;
using Volo.Abp;
@ -23,6 +24,9 @@ namespace Volo.CmsKit.Comments
[CanBeNull] Guid? repliedCommentId = null)
{
Check.NotNull(creator, nameof(creator));
Check.NotNullOrWhiteSpace(entityType, nameof(entityType), CommentConsts.MaxEntityTypeLength);
Check.NotNullOrWhiteSpace(entityId, nameof(entityId), CommentConsts.MaxEntityIdLength);
Check.NotNullOrWhiteSpace(text, nameof(text), CommentConsts.MaxTextLength);
if (!await DefinitionStore.IsDefinedAsync(entityType))
{

Loading…
Cancel
Save