3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

SECURITY: prevent DoS when calling --help on commands using IRCParser

argparse's default behaviour is to exit after displaying --help and --version information. However, doing so freezes the current IRC listener and essentially allows for DoS via IRC...
This bug does not affect any released (stable) version of PyLInk - only commits after 93c9b6289c
This commit is contained in:
James Lu 2017-03-06 16:07:43 -08:00
parent 2d03ceebc8
commit 76d74ab9bb

View File

@ -561,6 +561,9 @@ class IRCParser(argparse.ArgumentParser):
def error(self, message):
raise InvalidArgumentsError(message)
def exit(self, *args):
return
class DeprecatedAttributesObject():
"""
Object implementing deprecated attributes and warnings on access.