diff --git a/src/rss_thread_watch/feed_generator.clj b/src/rss_thread_watch/feed_generator.clj index c5528c3..2094262 100644 --- a/src/rss_thread_watch/feed_generator.clj +++ b/src/rss_thread_watch/feed_generator.clj @@ -165,7 +165,7 @@ (response/redirect (get @conf/GLOBAL-CONFIG :homepage))))) ;; No querry specified - don't know what to search for - (when-not (prms "q") + (when-not (some f/known-filter-set (keys prms)) (throw (ex-info "400" {:status 400 :header {"Content-Type" "text/plain"} :body (str "400 You MUST specify query with one OR more'q=searchTerm' (or 'Q=SeARChteRm' for case sensitive) url parameter(s)\n\n\n" diff --git a/src/rss_thread_watch/filters.clj b/src/rss_thread_watch/filters.clj index 1573583..071da96 100644 --- a/src/rss_thread_watch/filters.clj +++ b/src/rss_thread_watch/filters.clj @@ -34,3 +34,5 @@ {"Q" case-sensitive-filter "q" case-insensitive-filter}) +(def known-filter-set (set (keys known-filters))) +