You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sectxt PGP parsing can raise IndexError from pgpy #85
A possibly malformed, or perhaps just unusual, security.txt, can raise an IndexError from pgpy.
IndexError: bytearray index out of range
...
File "checks/tasks/securitytxt.py", line 138, in _evaluate_securitytxt
parser = sectxt.Parser(result.content, urls=result.found_url)
File "__init__.py", line 93, in __init__
self._process()
File "__init__.py", line 100, in _process
self._line_info.append(self._parse_line(line))
File "__init__.py", line 165, in _parse_line
pgpy.PGPMessage.from_blob(self._content_str)
File "pgpy/types.py", line 195, in from_blob
po = obj.parse(bytearray(blob, 'latin-1'))
File "pgpy/pgp.py", line 1285, in parse
pkt = Packet(data)
File "pgpy/types.py", line 508, in __call__
header.parse(packet)
File "pgpy/packet/types.py", line 109, in parse
self.length = packet
File "pgpy/decorators.py", line 47, in wrapper
return sd.dispatch(args[0].__class__)(obj, *args, **kwargs)
File "pgpy/types.py", line 389, in length_bin
_new_len(val) if self._lenfmt == 1 else _old_len(val)
File "pgpy/types.py", line 374, in _new_len
part_len, size, partial = _parse_len(b, total)
File "pgpy/types.py", line 349, in _parse_len
fo = a[offset]
Activity