Archived
1
0

make inbound nntp check feed policy

This commit is contained in:
Jeff Becker 2017-04-23 07:57:50 -04:00
parent 9e291b1c5a
commit fbafc56b4c

View File

@ -439,6 +439,9 @@ func (self *nntpConnection) checkMIMEHeaderNoAuth(daemon *NNTPDaemon, hdr textpr
reason = "poster's pubkey is banned"
ban = true
return
} else if !self.policy.AllowsNewsgroup(newsgroup) {
reason = "newsground not allowed by feed policy"
ban = true
} else if !(ValidMessageID(msgid) || (reference != "" && !ValidMessageID(reference))) {
// invalid message id or reference
reason = "invalid reference or message id is '" + msgid + "' reference is '" + reference + "'"