Title and body length limited in requestcontroller

main
Inga 🏳‍🌈 14 years ago
parent f8144babbf
commit ae94c0865d
  1. 6
      IISMainHandler/handlers/request/AbstractNewMessageHandler.cs

@ -18,6 +18,9 @@ namespace FLocal.IISHandler.handlers.request {
if(title == "") { if(title == "") {
throw new FLocalException("Title is empty"); throw new FLocalException("Title is empty");
} }
if(title.Length > 100) {
throw new FLocalException("Title is too long");
}
return title; return title;
} }
@ -26,6 +29,9 @@ namespace FLocal.IISHandler.handlers.request {
if(body == "") { if(body == "") {
throw new FLocalException("Body is empty"); throw new FLocalException("Body is empty");
} }
if(body.Length > 30000) {
throw new FLocalException("Body is too long");
}
return body; return body;
} }

Loading…
Cancel
Save