summaryrefslogtreecommitdiffstats
path: root/src
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 /src
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 'src')
-rw-r--r--src/DotNetOpenAuth.Core/Loggers/Log4NetLogger.cs2
-rw-r--r--src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs3
-rw-r--r--src/DotNetOpenAuth.Core/Util.cs2
-rw-r--r--src/DotNetOpenAuth.OpenId/OpenId/UriIdentifier.cs5
4 files changed, 10 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth.Core/Loggers/Log4NetLogger.cs b/src/DotNetOpenAuth.Core/Loggers/Log4NetLogger.cs
index 293a6b2..01da034 100644
--- a/src/DotNetOpenAuth.Core/Loggers/Log4NetLogger.cs
+++ b/src/DotNetOpenAuth.Core/Loggers/Log4NetLogger.cs
@@ -201,6 +201,8 @@ namespace DotNetOpenAuth.Loggers {
return IsLog4NetPresent ? CreateLogger(name) : null;
} catch (FileLoadException) { // wrong log4net.dll version
return null;
+ } catch (TargetInvocationException) { // Thrown due to some security issues on .NET 4.5.
+ return null;
} catch (TypeLoadException) { // Thrown by mono (http://stackoverflow.com/questions/10805773/error-when-pushing-dotnetopenauth-to-staging-or-production-environment)
return null;
}
diff --git a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs
index e859162..80703c1 100644
--- a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs
+++ b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs
@@ -399,7 +399,8 @@ namespace DotNetOpenAuth.Messaging {
// the public URL:
if (serverVariables["HTTP_HOST"] != null) {
ErrorUtilities.VerifySupported(request.Url.Scheme == Uri.UriSchemeHttps || request.Url.Scheme == Uri.UriSchemeHttp, "Only HTTP and HTTPS are supported protocols.");
- string scheme = serverVariables["HTTP_X_FORWARDED_PROTO"] ?? request.Url.Scheme;
+ string scheme = serverVariables["HTTP_X_FORWARDED_PROTO"] ??
+ (string.Equals(serverVariables["HTTP_FRONT_END_HTTPS"], "on", StringComparison.OrdinalIgnoreCase) ? Uri.UriSchemeHttps : request.Url.Scheme);
Uri hostAndPort = new Uri(scheme + Uri.SchemeDelimiter + serverVariables["HTTP_HOST"]);
UriBuilder publicRequestUri = new UriBuilder(request.Url);
publicRequestUri.Scheme = scheme;
diff --git a/src/DotNetOpenAuth.Core/Util.cs b/src/DotNetOpenAuth.Core/Util.cs
index 3babba5..26b7b45 100644
--- a/src/DotNetOpenAuth.Core/Util.cs
+++ b/src/DotNetOpenAuth.Core/Util.cs
@@ -111,7 +111,7 @@ namespace DotNetOpenAuth {
foreach (var pair in pairs) {
var key = pair.Key.ToString();
string value = pair.Value.ToString();
- if (messageDictionary != null && messageDictionary.Description.Mapping[key].IsSecuritySensitive) {
+ if (messageDictionary != null && messageDictionary.Description.Mapping.ContainsKey(key) && messageDictionary.Description.Mapping[key].IsSecuritySensitive) {
value = "********";
}
diff --git a/src/DotNetOpenAuth.OpenId/OpenId/UriIdentifier.cs b/src/DotNetOpenAuth.OpenId/OpenId/UriIdentifier.cs
index 631eab6..41417de 100644
--- a/src/DotNetOpenAuth.OpenId/OpenId/UriIdentifier.cs
+++ b/src/DotNetOpenAuth.OpenId/OpenId/UriIdentifier.cs
@@ -69,6 +69,11 @@ namespace DotNetOpenAuth.OpenId {
/// </remarks>
[SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline", Justification = "Some things just can't be done in a field initializer.")]
static UriIdentifier() {
+ if (Type.GetType("Mono.Runtime") != null) {
+ // Uri scheme registration doesn't work on mono.
+ return;
+ }
+
// Our first attempt to handle trailing periods in path segments is to leverage
// full trust if it's available to rewrite the rules.
// In fact this is the ONLY way in .NET 3.5 (and arguably in .NET 4.0) to send