Skip to content

Commit acda23d

Browse files
authored
Revert "change origin verify to use fully qualified origin (#208)" (#211)
This reverts commit fb5b952.
1 parent 627e2be commit acda23d

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Src/Fido2/AuthenticatorResponse.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected void BaseVerify(string expectedOrigin, byte[] originalChallenge, byte[
6868
throw new Fido2VerificationException("Challenge not equal to original challenge");
6969

7070
// 5. Verify that the value of C.origin matches the Relying Party's origin.
71-
if (!string.Equals(FullyQualifiedOrigin(this.Origin), expectedOrigin, StringComparison.OrdinalIgnoreCase))
71+
if (Origin != expectedOrigin)
7272
throw new Fido2VerificationException($"Origin {Origin} not equal to original origin {expectedOrigin}");
7373

7474
// 6. Verify that the value of C.tokenBinding.status matches the state of Token Binding for the TLS connection over which the assertion was obtained.
@@ -78,12 +78,5 @@ protected void BaseVerify(string expectedOrigin, byte[] originalChallenge, byte[
7878
TokenBinding.Verify(requestTokenBindingId);
7979
}
8080
}
81-
82-
private string FullyQualifiedOrigin(string origin)
83-
{
84-
var uri = new Uri(origin);
85-
86-
return $"{uri.Scheme}://{uri.Host}";
87-
}
8881
}
8982
}

0 commit comments

Comments
 (0)