diff --git a/contrib/backends/srndv2/src/srnd/frontend_http.go b/contrib/backends/srndv2/src/srnd/frontend_http.go index 4ac4f15..d2c276f 100644 --- a/contrib/backends/srndv2/src/srnd/frontend_http.go +++ b/contrib/backends/srndv2/src/srnd/frontend_http.go @@ -803,6 +803,11 @@ func (self *httpFrontend) handle_postRequest(pr *postRequest, b bannedFunc, e er return } + if !self.daemon.CheckText(pr.Message) { + e(errors.New("spam")) + return + } + if len(pr.Frontend) == 0 { // :-DDD pr.Frontend = "mongo.db.is.web.scale" diff --git a/contrib/backends/srndv2/src/srnd/store.go b/contrib/backends/srndv2/src/srnd/store.go index 2686338..902affc 100644 --- a/contrib/backends/srndv2/src/srnd/store.go +++ b/contrib/backends/srndv2/src/srnd/store.go @@ -439,6 +439,7 @@ func (self *articleStore) getMIMEHeader(messageID string) (hdr textproto.MIMEHea func (self *articleStore) ProcessMessageBody(wr io.Writer, hdr textproto.MIMEHeader, body *io.LimitedReader, spamfilter func(string) bool) (err error) { err = read_message_body(body, hdr, self, wr, false, func(nntp NNTPMessage) { + log.Println(nntp.Message()) if !spamfilter(nntp.Message()) { err = errors.New("spam message") return