mirror of https://github.com/progval/irctest.git
test long-line DoS attacks
This commit is contained in:
parent
14435ce0e8
commit
3b489a2125
|
@ -0,0 +1,19 @@
|
|||
from irctest import cases
|
||||
|
||||
|
||||
class ReadqTestCase(cases.BaseServerTestCase):
|
||||
"""Test responses to DoS attacks using long lines."""
|
||||
|
||||
@cases.SpecificationSelector.requiredBySpecification('Oragono')
|
||||
def testReadqTags(self):
|
||||
self.connectClient('mallory', name='mallory', capabilities=['message-tags'])
|
||||
self.joinChannel('mallory', '#test')
|
||||
self.sendLine('mallory', 'PRIVMSG #test ' + 'a' * 16384)
|
||||
self.assertDisconnected('mallory')
|
||||
|
||||
@cases.SpecificationSelector.requiredBySpecification('Oragono')
|
||||
def testReadqNoTags(self):
|
||||
self.connectClient('mallory', name='mallory')
|
||||
self.joinChannel('mallory', '#test')
|
||||
self.sendLine('mallory', 'PRIVMSG #test ' + 'a' * 16384)
|
||||
self.assertDisconnected('mallory')
|
Loading…
Reference in New Issue