From d937ea6562a9606581ffe25f64a6056942c13794 Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 13 Aug 2017 17:58:01 +1200 Subject: [PATCH] prevent viewing history for unknown articles --- rHistory.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rHistory.go b/rHistory.go index b3684f9..dedf7f5 100644 --- a/rHistory.go +++ b/rHistory.go @@ -20,6 +20,11 @@ func (this *WikiServer) routeHistory(w http.ResponseWriter, r *http.Request, art return } + if len(revs) == 0 { + this.serveErrorHTMLMessage(w, this.noSuchArticleError(articleTitle)) + return + } + pto := DefaultPageTemplateOptions(this.opts) pto.CurrentPageName = articleTitle pto.CurrentPageIsArticle = true