Archived
1
0

eh whatever this should work

This commit is contained in:
Jeff Becker 2017-08-08 09:32:18 -04:00
parent 32e9e4b3eb
commit d48b585fcf
2 changed files with 6 additions and 0 deletions

View File

@ -803,6 +803,11 @@ func (self *httpFrontend) handle_postRequest(pr *postRequest, b bannedFunc, e er
return return
} }
if !self.daemon.CheckText(pr.Message) {
e(errors.New("spam"))
return
}
if len(pr.Frontend) == 0 { if len(pr.Frontend) == 0 {
// :-DDD // :-DDD
pr.Frontend = "mongo.db.is.web.scale" pr.Frontend = "mongo.db.is.web.scale"

View File

@ -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) { 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) { err = read_message_body(body, hdr, self, wr, false, func(nntp NNTPMessage) {
log.Println(nntp.Message())
if !spamfilter(nntp.Message()) { if !spamfilter(nntp.Message()) {
err = errors.New("spam message") err = errors.New("spam message")
return return