Skip to content

Commit

Permalink
Fix bugs from CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanhiebert authored Aug 6, 2024
1 parent 567d5ee commit 16d1115
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fido2/rpid.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def verify_rp_id(rp_id: str, origin: str) -> bool:
if (
url.scheme != "https"
and (url.scheme, host) != ("http", "localhost")
and not (url.scheme == "http" and host.endswith(".localhost"))
and not (url.scheme == "http" and host and host.endswith(".localhost"))
):
return False
if host == rp_id:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rpid.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ def test_localhost_http_secure_context(self):
self.assertTrue(verify_rp_id("localhost", "http://example.localhost"))
self.assertTrue(verify_rp_id("example.localhost", "http://example.localhost"))
self.assertTrue(verify_rp_id("localhost", "http://localhost:8000"))

self.assertFalse(verify_rp_id("localhost", "http://"))

0 comments on commit 16d1115

Please sign in to comment.