Cap editorconfig line length to 256
Thanks to Naglis Jonaitis for pointing out the opportunity for a DoS through this. Signed-off-by: Drew DeVault <sir@cmpwn.com>
This commit is contained in:
parent
077615094c
commit
7144962487
|
@ -63,7 +63,10 @@ class EditorConfig:
|
|||
if self._config == None:
|
||||
return 80
|
||||
try:
|
||||
return int(self._config.get("max_line_length", 80))
|
||||
length = int(self._config.get("max_line_length", 80))
|
||||
if length > 256:
|
||||
length = 80
|
||||
return length
|
||||
except ValueError:
|
||||
return 80
|
||||
|
||||
|
|
Loading…
Reference in New Issue