From e78e52debb9eb952652ed0181c15617cc3873178 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sat, 16 Jun 2018 18:08:14 -0400 Subject: [PATCH] Revert "add check for short posts" This reverts commit d5e0f7d6986154309a994d68d14b916e823d2578. --- contrib/backends/srndv2/src/srnd/frontend_http.go | 7 ------- contrib/backends/srndv2/src/srnd/util.go | 6 ------ 2 files changed, 13 deletions(-) diff --git a/contrib/backends/srndv2/src/srnd/frontend_http.go b/contrib/backends/srndv2/src/srnd/frontend_http.go index 852a89a..dcd3ca9 100644 --- a/contrib/backends/srndv2/src/srnd/frontend_http.go +++ b/contrib/backends/srndv2/src/srnd/frontend_http.go @@ -680,13 +680,6 @@ func (self *httpFrontend) handle_postRequest(pr *postRequest, b bannedFunc, e er e(err) return } - - if !hasAtLeastNWords(m, 3) { - err = errors.New("your message is too short") - e(err) - return - } - nntp := new(nntpArticle) defer nntp.Reset() var banned bool diff --git a/contrib/backends/srndv2/src/srnd/util.go b/contrib/backends/srndv2/src/srnd/util.go index e7cf61a..dc7f286 100644 --- a/contrib/backends/srndv2/src/srnd/util.go +++ b/contrib/backends/srndv2/src/srnd/util.go @@ -800,9 +800,3 @@ func storeMessage(daemon *NNTPDaemon, hdr textproto.MIMEHeader, body io.Reader) } return } - - -func hasAtLeastNWords(str string, n int) bool { - parts := strings.Split(str, " ") - return len(parts) > n -} \ No newline at end of file