Skip to content

Commit ef9b910

Browse files
authored
[py] Fix default rpId in virtual authenticator (#16428)
1 parent 84358bd commit ef9b910

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

py/selenium/webdriver/common/virtual_authenticator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def __init__(
8080
self,
8181
credential_id: bytes,
8282
is_resident_credential: bool,
83-
rp_id: str,
83+
rp_id: Optional[str],
8484
user_handle: Optional[bytes],
8585
private_key: bytes,
8686
sign_count: int,
@@ -180,7 +180,7 @@ def to_dict(self) -> dict[str, Any]:
180180
def from_dict(cls, data: dict[str, Any]) -> "Credential":
181181
_id = urlsafe_b64decode(f"{data['credentialId']}==")
182182
is_resident_credential = bool(data["isResidentCredential"])
183-
rp_id = data["rpId"]
183+
rp_id = data.get("rpId", None)
184184
private_key = urlsafe_b64decode(f"{data['privateKey']}==")
185185
sign_count = int(data["signCount"])
186186
user_handle = urlsafe_b64decode(f"{data['userHandle']}==") if data.get("userHandle", None) else None

0 commit comments

Comments
 (0)