fix: normalize trailing slashes before length check in check_resource_allowed (#2074)
This commit is contained in:
parent
705497a593
commit
be5bb7c4f2
1 changed files with 5 additions and 16 deletions
|
|
@ -104,7 +104,7 @@ def test_check_resource_allowed_trailing_slash_handling():
|
|||
"""Trailing slashes should be handled correctly."""
|
||||
# With and without trailing slashes
|
||||
assert check_resource_allowed("https://example.com/api/", "https://example.com/api") is True
|
||||
assert check_resource_allowed("https://example.com/api", "https://example.com/api/") is False
|
||||
assert check_resource_allowed("https://example.com/api", "https://example.com/api/") is True
|
||||
assert check_resource_allowed("https://example.com/api/v1", "https://example.com/api") is True
|
||||
assert check_resource_allowed("https://example.com/api/v1", "https://example.com/api/") is True
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue