eh whatever this should work
This commit is contained in:
parent
32e9e4b3eb
commit
d48b585fcf
@ -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"
|
||||||
|
@ -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
|
||||||
|
Reference in New Issue
Block a user