mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 12:12:53 +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:
parent
2d03ceebc8
commit
76d74ab9bb
3
utils.py
3
utils.py
@ -561,6 +561,9 @@ class IRCParser(argparse.ArgumentParser):
|
|||||||
def error(self, message):
|
def error(self, message):
|
||||||
raise InvalidArgumentsError(message)
|
raise InvalidArgumentsError(message)
|
||||||
|
|
||||||
|
def exit(self, *args):
|
||||||
|
return
|
||||||
|
|
||||||
class DeprecatedAttributesObject():
|
class DeprecatedAttributesObject():
|
||||||
"""
|
"""
|
||||||
Object implementing deprecated attributes and warnings on access.
|
Object implementing deprecated attributes and warnings on access.
|
||||||
|
Loading…
Reference in New Issue
Block a user