summaryrefslogtreecommitdiffstats
path: root/samples/OpenIdProviderMvc/Controllers/OpenIdController.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2013-04-11 22:53:35 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2013-04-11 22:53:35 -0700
commit2feb70bbb0c47a95a6edf68c492b4c2c7d2266bb (patch)
tree472a4b5c61b5250f8b4cbc291a619361a780a261 /samples/OpenIdProviderMvc/Controllers/OpenIdController.cs
parente6398df1dc2d5a9d1c50d08dd29da71dbc5eb623 (diff)
parent778328ec797299ed6aa01279b3ccbf1eb15258bd (diff)
downloadDotNetOpenAuth-2feb70bbb0c47a95a6edf68c492b4c2c7d2266bb.zip
DotNetOpenAuth-2feb70bbb0c47a95a6edf68c492b4c2c7d2266bb.tar.gz
DotNetOpenAuth-2feb70bbb0c47a95a6edf68c492b4c2c7d2266bb.tar.bz2
Merge branch 'v4.1' into v4.2
Conflicts: src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs
Diffstat (limited to 'samples/OpenIdProviderMvc/Controllers/OpenIdController.cs')
-rw-r--r--samples/OpenIdProviderMvc/Controllers/OpenIdController.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/samples/OpenIdProviderMvc/Controllers/OpenIdController.cs b/samples/OpenIdProviderMvc/Controllers/OpenIdController.cs
index bd6de1b..6abbe17 100644
--- a/samples/OpenIdProviderMvc/Controllers/OpenIdController.cs
+++ b/samples/OpenIdProviderMvc/Controllers/OpenIdController.cs
@@ -267,7 +267,12 @@ namespace OpenIdProviderMvc.Controllers {
}
Uri userLocalIdentifier = Models.User.GetClaimedIdentifierForUser(User.Identity.Name);
- return authReq.LocalIdentifier == userLocalIdentifier ||
+
+ // Assuming the URLs on the web server are not case sensitive (on Windows servers they almost never are),
+ // and usernames aren't either, compare the identifiers without case sensitivity.
+ // No reason to do this for the PPID identifiers though, since they *can* be case sensitive and are highly
+ // unlikely to be typed in by the user anyway.
+ return string.Equals(authReq.LocalIdentifier.ToString(), userLocalIdentifier.ToString(), StringComparison.OrdinalIgnoreCase) ||
authReq.LocalIdentifier == PpidGeneration.PpidIdentifierProvider.GetIdentifier(userLocalIdentifier, authReq.Realm);
}
}