Skip to content

wrong parse #128

Open
Open
@Draeli

Description

@Draeli

Working on filtering URL system I found that case where False is expected but return True.

Code to test :

from rfc3986 import is_valid_uri

def test_url(url: str) -> bool:
    try:
        assert is_valid_uri(url, require_scheme=True, require_authority=True, require_path=False)
    except AssertionError:
        return False
    return True

url = "http://'www.amazon.com/s/url=search-alias\%3dstripbooks&field-keywords=z+programming'"
test_url(url)

To be more precise in the report, while RFC 3386 does not explicitly forbid the character ' both RFC1123 and RFC952 prohibit this character in DNS names. Therefore, it should be taken into consideration for this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions