diff --git a/IISMainHandler/handlers/request/AbstractNewMessageHandler.cs b/IISMainHandler/handlers/request/AbstractNewMessageHandler.cs index 9a976ea..35dcc6c 100644 --- a/IISMainHandler/handlers/request/AbstractNewMessageHandler.cs +++ b/IISMainHandler/handlers/request/AbstractNewMessageHandler.cs @@ -18,6 +18,9 @@ namespace FLocal.IISHandler.handlers.request { if(title == "") { throw new FLocalException("Title is empty"); } + if(title.Length > 100) { + throw new FLocalException("Title is too long"); + } return title; } @@ -26,6 +29,9 @@ namespace FLocal.IISHandler.handlers.request { if(body == "") { throw new FLocalException("Body is empty"); } + if(body.Length > 30000) { + throw new FLocalException("Body is too long"); + } return body; }