diff options
Diffstat (limited to 'src/DotNetOpenId')
-rw-r--r-- | src/DotNetOpenId/Properties/AssemblyInfo.cs | 2 | ||||
-rw-r--r-- | src/DotNetOpenId/Provider/CheckIdRequest.cs | 8 | ||||
-rw-r--r-- | src/DotNetOpenId/RelyingParty/AuthenticationResponse.cs | 4 | ||||
-rw-r--r-- | src/DotNetOpenId/RelyingParty/OpenIdMobileTextBox.cs | 3 | ||||
-rw-r--r-- | src/DotNetOpenId/Yadis/ServiceElement.cs | 4 | ||||
-rw-r--r-- | src/DotNetOpenId/Yadis/XrdElement.cs | 4 |
6 files changed, 15 insertions, 10 deletions
diff --git a/src/DotNetOpenId/Properties/AssemblyInfo.cs b/src/DotNetOpenId/Properties/AssemblyInfo.cs index 30dea0c..f25b6ae 100644 --- a/src/DotNetOpenId/Properties/AssemblyInfo.cs +++ b/src/DotNetOpenId/Properties/AssemblyInfo.cs @@ -67,8 +67,10 @@ using System.Web.UI; // Allows the consumer to call out to the web server. This is unnecessary in provider-only scenarios.
// Note: we don't use a single demand for https?://.* because the regex pattern must exactly
// match the one used by hosting providers. Listing them individually seems to be more common.
+#if !__MonoCS__
[assembly: WebPermission(SecurityAction.RequestMinimum, ConnectPattern = @"http://.*")]
[assembly: WebPermission(SecurityAction.RequestMinimum, ConnectPattern = @"https://.*")]
+#endif
#if PARTIAL_TRUST
// Allows hosting this assembly in an ASP.NET setting. Not all applications
diff --git a/src/DotNetOpenId/Provider/CheckIdRequest.cs b/src/DotNetOpenId/Provider/CheckIdRequest.cs index 373ba2e..98d7428 100644 --- a/src/DotNetOpenId/Provider/CheckIdRequest.cs +++ b/src/DotNetOpenId/Provider/CheckIdRequest.cs @@ -243,8 +243,8 @@ namespace DotNetOpenId.Provider { }
if (Protocol.Version.Major >= 2) {
- if (LocalIdentifier == Protocol.ClaimedIdentifierForOPIdentifier ^
- ClaimedIdentifier == Protocol.ClaimedIdentifierForOPIdentifier) {
+ if (LocalIdentifier == ((Identifier)Protocol.ClaimedIdentifierForOPIdentifier) ^
+ ClaimedIdentifier == ((Identifier)Protocol.ClaimedIdentifierForOPIdentifier)) {
throw new OpenIdException(string.Format(CultureInfo.CurrentCulture,
Strings.MatchingArgumentsExpected, Protocol.openid.claimed_id,
Protocol.openid.identity, Protocol.ClaimedIdentifierForOPIdentifier),
@@ -252,7 +252,7 @@ namespace DotNetOpenId.Provider { }
}
- if (ClaimedIdentifier == Protocol.ClaimedIdentifierForOPIdentifier &&
+ if (ClaimedIdentifier == ((Identifier)Protocol.ClaimedIdentifierForOPIdentifier) &&
Protocol.ClaimedIdentifierForOPIdentifier != null) {
// Force the OP to deal with identifier_select by nulling out the two identifiers.
IsDirectedIdentity = true;
@@ -314,4 +314,4 @@ CheckIdRequest.ReturnTo = '{4}' returnString, Immediate, Realm, LocalIdentifier, Mode, ReturnTo);
}
}
-}
\ No newline at end of file +} diff --git a/src/DotNetOpenId/RelyingParty/AuthenticationResponse.cs b/src/DotNetOpenId/RelyingParty/AuthenticationResponse.cs index 462b017..6766304 100644 --- a/src/DotNetOpenId/RelyingParty/AuthenticationResponse.cs +++ b/src/DotNetOpenId/RelyingParty/AuthenticationResponse.cs @@ -379,7 +379,7 @@ namespace DotNetOpenId.RelyingParty { // For 1.x OPs, we only need to verify that the OP Local Identifier
// hasn't changed since we made the request.
if (tokenEndpoint.ProviderLocalIdentifier !=
- Util.GetRequiredArg(query, tokenEndpoint.Protocol.openid.identity)) {
+ ((Identifier)Util.GetRequiredArg(query, tokenEndpoint.Protocol.openid.identity))) {
throw new OpenIdException(string.Format(CultureInfo.CurrentCulture,
Strings.TamperingDetected, tokenEndpoint.Protocol.openid.identity,
tokenEndpoint.ProviderLocalIdentifier,
@@ -393,7 +393,7 @@ namespace DotNetOpenId.RelyingParty { // to speak for it.
if (tokenEndpoint == null || // no token included (unsolicited assertion)
tokenEndpoint != responseEndpoint || // the OP is asserting something different than we asked for
- tokenEndpoint.ClaimedIdentifier == tokenEndpoint.Protocol.ClaimedIdentifierForOPIdentifier) { // or directed identity is in effect
+ tokenEndpoint.ClaimedIdentifier == ((Identifier)tokenEndpoint.Protocol.ClaimedIdentifierForOPIdentifier)) { // or directed identity is in effect
Identifier claimedIdentifier = Util.GetRequiredArg(query, responseEndpoint.Protocol.openid.claimed_id);
// Require SSL where appropriate. This will filter out insecure identifiers,
// redirects and provider endpoints automatically. If we find a match after all that
diff --git a/src/DotNetOpenId/RelyingParty/OpenIdMobileTextBox.cs b/src/DotNetOpenId/RelyingParty/OpenIdMobileTextBox.cs index e5360a7..7f6c49d 100644 --- a/src/DotNetOpenId/RelyingParty/OpenIdMobileTextBox.cs +++ b/src/DotNetOpenId/RelyingParty/OpenIdMobileTextBox.cs @@ -5,6 +5,7 @@ * For news or support on this file: http://blog.nerdbank.net/
********************************************************/
+#if !__MonoCS__ using System;
using System.ComponentModel;
using System.Diagnostics;
@@ -495,3 +496,5 @@ namespace DotNetOpenId.RelyingParty #endregion
}
}
+#endif + diff --git a/src/DotNetOpenId/Yadis/ServiceElement.cs b/src/DotNetOpenId/Yadis/ServiceElement.cs index 2e0e7db..21837e1 100644 --- a/src/DotNetOpenId/Yadis/ServiceElement.cs +++ b/src/DotNetOpenId/Yadis/ServiceElement.cs @@ -24,7 +24,7 @@ namespace DotNetOpenId.Yadis { get {
List<UriElement> uris = new List<UriElement>();
foreach (XPathNavigator node in Node.Select("xrd:URI", XmlNamespaceResolver)) {
- uris.Add(new UriElement(node, this));
+ uris.Add(new UriElement(node.Clone(), this));
}
uris.Sort();
return uris;
@@ -34,7 +34,7 @@ namespace DotNetOpenId.Yadis { public IEnumerable<TypeElement> TypeElements {
get {
foreach (XPathNavigator node in Node.Select("xrd:Type", XmlNamespaceResolver)) {
- yield return new TypeElement(node, this);
+ yield return new TypeElement(node.Clone(), this);
}
}
}
diff --git a/src/DotNetOpenId/Yadis/XrdElement.cs b/src/DotNetOpenId/Yadis/XrdElement.cs index 5665f58..5c0ba44 100644 --- a/src/DotNetOpenId/Yadis/XrdElement.cs +++ b/src/DotNetOpenId/Yadis/XrdElement.cs @@ -15,7 +15,7 @@ namespace DotNetOpenId.Yadis { // We should enumerate them in priority order
List<ServiceElement> services = new List<ServiceElement>();
foreach (XPathNavigator node in Node.Select("xrd:Service", XmlNamespaceResolver)) {
- services.Add(new ServiceElement(node, this));
+ services.Add(new ServiceElement(node.Clone(), this));
}
services.Sort();
return services;
@@ -72,7 +72,7 @@ namespace DotNetOpenId.Yadis { xpath.Append("]");
var services = new List<ServiceElement>();
foreach (XPathNavigator service in Node.Select(xpath.ToString(), XmlNamespaceResolver)) {
- services.Add(new ServiceElement(service, this));
+ services.Add(new ServiceElement(service.Clone(), this));
}
// Put the services in their own defined priority order
services.Sort();
|