Skip to content

Commit 3923583

Browse files
authored
Merge pull request #1210 from progressonderwijs/revert-1208-patrick/optionally_check_signature
Revert "Add an option to ignore signature validation"
2 parents d9da9e3 + 351cf74 commit 3923583

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/ProgressOnderwijsUtils/SingleSignOn/SsoProcessor.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,6 @@ static string EncodeQueryParameter(string key, string value)
4545
}
4646

4747
public static Maybe<SsoAttributes, string> GetAttributes(string rawSamlResponse, X509Certificate2 certificate)
48-
=> GetAttributes(rawSamlResponse, certificate, false);
49-
50-
[Obsolete("This method ignores signature validation and should not be used in production code")]
51-
public static Maybe<SsoAttributes, string> GetAttributesWithEvilIgnoreSignatureCheck(string rawSamlResponse, X509Certificate2 certificate)
52-
=> GetAttributes(rawSamlResponse, certificate, true);
53-
54-
static Maybe<SsoAttributes, string> GetAttributes(string rawSamlResponse, X509Certificate2 certificate, bool evilIgnoreSignatureCheck)
5548
{
5649
byte[] bytes;
5750
try {
@@ -92,7 +85,7 @@ static Maybe<SsoAttributes, string> GetAttributes(string rawSamlResponse, X509Ce
9285
return Maybe.Error("Public key missing");
9386
}
9487

95-
if (!dsig.CheckSignature(key) && !evilIgnoreSignatureCheck) {
88+
if (!dsig.CheckSignature(key)) {
9689
return Maybe.Error("Signature invalid");
9790
}
9891

0 commit comments

Comments
 (0)