File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ def _build_url(self, path: str) -> str:
9191 f"?{ normalized_parts .query } " if normalized_parts .query else ""
9292 )
9393 decoded_path = normalized_path_only
94- for _ in range (3 ):
94+ for _ in range (10 ):
9595 next_decoded_path = unquote (decoded_path )
9696 if next_decoded_path == decoded_path :
9797 break
Original file line number Diff line number Diff line change @@ -176,6 +176,10 @@ def test_client_build_url_rejects_empty_or_non_string_paths():
176176 HyperbrowserError , match = "path must not contain relative path segments"
177177 ):
178178 client ._build_url ("/%252e%252e/session" )
179+ with pytest .raises (
180+ HyperbrowserError , match = "path must not contain relative path segments"
181+ ):
182+ client ._build_url ("/%2525252e%2525252e/session" )
179183 with pytest .raises (
180184 HyperbrowserError , match = "path must not contain backslashes"
181185 ):
@@ -184,6 +188,10 @@ def test_client_build_url_rejects_empty_or_non_string_paths():
184188 HyperbrowserError , match = "path must not contain backslashes"
185189 ):
186190 client ._build_url ("/api/%255Csession" )
191+ with pytest .raises (
192+ HyperbrowserError , match = "path must not contain backslashes"
193+ ):
194+ client ._build_url ("/api/%2525255Csession" )
187195 with pytest .raises (
188196 HyperbrowserError , match = "path must not contain newline characters"
189197 ):
You can’t perform that action at this time.
0 commit comments