Skip to content

Commit

Permalink
Merge pull request #6544 from aspnetboilerplate/fix/6482
Browse files Browse the repository at this point in the history
Add max length to TargetNotifiers
  • Loading branch information
ismcagdas committed Sep 20, 2022
2 parents 2265c53 + 6af109b commit 0665b08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Abp/Notifications/NotificationInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public class NotificationInfo : CreationAuditedEntity<Guid>
/// </summary>
public const int MaxTenantIdsLength = 128 * 1024;

public const int MaxTargetNotifiersLength = 1024;

/// <summary>
/// Notification target list separation character.
/// </summary>
Expand Down Expand Up @@ -149,6 +151,7 @@ public class NotificationInfo : CreationAuditedEntity<Guid>
/// <summary>
/// which realtime notifiers should handle this notification
/// </summary>
[StringLength(MaxTargetNotifiersLength)]
public virtual string TargetNotifiers { get; set; }

[NotMapped]
Expand Down
3 changes: 3 additions & 0 deletions src/Abp/Notifications/UserNotificationInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ namespace Abp.Notifications
[Table("AbpUserNotifications")]
public class UserNotificationInfo : Entity<Guid>, IHasCreationTime, IMayHaveTenant
{
public const int MaxTargetNotifiersLength = 1024;

/// <summary>
/// Tenant Id.
/// </summary>
Expand All @@ -43,6 +45,7 @@ public class UserNotificationInfo : Entity<Guid>, IHasCreationTime, IMayHaveTena
/// <summary>
/// which realtime notifiers should handle this notification
/// </summary>
[StringLength(MaxTargetNotifiersLength)]
public virtual string TargetNotifiers { get; set; }

[NotMapped]
Expand Down

0 comments on commit 0665b08

Please sign in to comment.