Skip to content

Weird external link causes exception #109

@TrueBrain

Description

@TrueBrain

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions