Skip to content

wrong parse #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Draeli opened this issue Mar 5, 2025 · 0 comments
Open

wrong parse #128

Draeli opened this issue Mar 5, 2025 · 0 comments

Comments

@Draeli
Copy link

Draeli commented Mar 5, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant