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 == "") {
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;
}

Loading…
Cancel
Save