diff --git a/Sources/App/Models/BadWords.swift b/Sources/App/Models/BadWords.swift index 83e522a..8422028 100644 --- a/Sources/App/Models/BadWords.swift +++ b/Sources/App/Models/BadWords.swift @@ -4,7 +4,7 @@ import Vapor func checkForBadWords(in string: String) throws { let split = string.split(separator: "\n") for string in split { - for word in badWords where string.contains(word) { + for word in badWords where string.lowercased().contains(word) { throw Abort(.badRequest, reason: "Stop using such naughty language.") } }