diff options
author | Eric Wong <e@80x24.org> | 2015-09-30 21:00:24 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-09-30 21:09:23 +0000 |
commit | 3393117e5ff8faef209bbf4988a59743f00b2a80 (patch) | |
tree | 4a48b9b1585483e623d1e9dbbf420399df1d49b6 /lib/PublicInbox/NNTP.pm | |
parent | 96978b1c72ee9c5f589ce8a93b2a858424f057ba (diff) | |
download | public-inbox-3393117e5ff8faef209bbf4988a59743f00b2a80.tar.gz |
We shall remove slow, unoptimized headers in XHDR/HDR to avoid becoming an easy DoS target.
Diffstat (limited to 'lib/PublicInbox/NNTP.pm')
-rw-r--r-- | lib/PublicInbox/NNTP.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm index 142bee39..12760394 100644 --- a/lib/PublicInbox/NNTP.pm +++ b/lib/PublicInbox/NNTP.pm @@ -25,6 +25,8 @@ sub now () { clock_gettime(CLOCK_MONOTONIC) }; my @OVERVIEW = qw(Subject From Date Message-ID References Bytes Lines); my $OVERVIEW_FMT = join(":\r\n", @OVERVIEW) . ":\r\n"; +my $LIST_HEADERS = join("\r\n", qw(Subject From Date Message-ID References + :bytes :lines Xref To Cc)) . "\r\n"; # disable commands with easy DoS potential: # LISTGROUP could get pretty bad, too... @@ -95,6 +97,11 @@ sub list_overview_fmt ($) { do_more($self, $OVERVIEW_FMT); } +sub list_headers ($;$) { + my ($self) = @_; + do_more($self, $LIST_HEADERS); +} + sub list_active ($;$) { my ($self, $wildmat) = @_; wildmat2re($wildmat); |