Bit of backstory: a user managed to get an exception on TrueWiki, which I was unable to condense in a small snippet myself. So I run a fuzzer against TrueWiki, which in the end managed to make the problem very small. The user was entering something similar to this:
[[//[[/]]]
In a testcase:
import wikitextparser
wikitextparser.parse("[[//[[/]]]").external_links[0].url
Triggers an exception in
|
return self(1, URL_MATCH(self._ext_link_shadow, 1).end()) |
:
AttributeError: 'NoneType' object has no attribute 'end'
That said, it is amazing how much this library can handle, and how little errors showed up because of the fuzzing. It is really a nice piece of work you did here, in terms of being able to handle users doing the weirdest stuff :D
Bit of backstory: a user managed to get an exception on TrueWiki, which I was unable to condense in a small snippet myself. So I run a fuzzer against TrueWiki, which in the end managed to make the problem very small. The user was entering something similar to this:
[[//[[/]]]In a testcase:
Triggers an exception in
wikitextparser/wikitextparser/_externallink.py
Line 25 in f64e098
AttributeError: 'NoneType' object has no attribute 'end'That said, it is amazing how much this library can handle, and how little errors showed up because of the fuzzing. It is really a nice piece of work you did here, in terms of being able to handle users doing the weirdest stuff :D