From ae94c0865d4760bbf192f0e85a3c23bd28f381d0 Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Sun, 4 Jul 2010 22:10:40 +0000 Subject: [PATCH] Title and body length limited in requestcontroller --- .../handlers/request/AbstractNewMessageHandler.cs | 6 ++++++ 1 file changed, 6 insertions(+) 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; }