From fbafc56b4cf2ad41413f57c13b21803286da986f Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sun, 23 Apr 2017 07:57:50 -0400 Subject: [PATCH] make inbound nntp check feed policy --- contrib/backends/srndv2/src/srnd/nntp.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/backends/srndv2/src/srnd/nntp.go b/contrib/backends/srndv2/src/srnd/nntp.go index 84ddbe4..acd4794 100644 --- a/contrib/backends/srndv2/src/srnd/nntp.go +++ b/contrib/backends/srndv2/src/srnd/nntp.go @@ -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 + "'"