summaryrefslogtreecommitdiff
path: root/Project-Unite/Controllers/ForumController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Project-Unite/Controllers/ForumController.cs')
-rw-r--r--Project-Unite/Controllers/ForumController.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Project-Unite/Controllers/ForumController.cs b/Project-Unite/Controllers/ForumController.cs
index 4236286..c416cbd 100644
--- a/Project-Unite/Controllers/ForumController.cs
+++ b/Project-Unite/Controllers/ForumController.cs
@@ -254,6 +254,10 @@ namespace Project_Unite.Controllers
return new HttpStatusCodeResult(404);
string subjectId = model.Subject;
+
+ if (String.IsNullOrWhiteSpace(model.Subject) == true)
+ ViewBag.Error = "hey no null subjects";
+
char[] badChars = subjectId.Where(x => !AllowedChars.Contains(x)).ToArray();
foreach(var c in badChars)