From 1734b387a353cab21b1f768791af8983e9f9ec98 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Wed, 19 Jun 2013 15:45:40 -0400 Subject: [PATCH] Fix for bug #2237 --- SoObjects/SOGo/SOGoProxyAuthenticator.m | 20 +++++++++++++------- SoObjects/SOGo/SOGoPublicBaseFolder.m | 4 +--- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/SoObjects/SOGo/SOGoProxyAuthenticator.m b/SoObjects/SOGo/SOGoProxyAuthenticator.m index 7b1e96bb2..42d608f41 100644 --- a/SoObjects/SOGo/SOGoProxyAuthenticator.m +++ b/SoObjects/SOGo/SOGoProxyAuthenticator.m @@ -1,8 +1,6 @@ /* SOGoProxyAuthenticator.h - this file is part of SOGo * - * Copyright (C) 2009-2011 Inverse inc. - * - * Author: Wolfgang Sourdeau + * Copyright (C) 2009-2013 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,6 +30,7 @@ #import #import "SOGoPermissions.h" +#import "SOGoSystemDefaults.h" #import "SOGoUser.h" #import "SOGoProxyAuthenticator.h" @@ -60,10 +59,17 @@ { NSString *remoteUser; - /* If such a header is not provided by the proxy, SOPE will attempt to - deduce it from the "Authorization" header. */ - remoteUser = [[context request] headerForKey: @"x-webobjects-remote-user"]; - + if ([[SOGoSystemDefaults sharedSystemDefaults] trustProxyAuthentication]) + { + remoteUser = @"anonymous"; + } + else + { + /* If such a header is not provided by the proxy, SOPE will attempt to + deduce it from the "Authorization" header. */ + remoteUser = [[context request] headerForKey: @"x-webobjects-remote-user"]; + } + return remoteUser; } diff --git a/SoObjects/SOGo/SOGoPublicBaseFolder.m b/SoObjects/SOGo/SOGoPublicBaseFolder.m index 53bec7d6b..b26969a62 100644 --- a/SoObjects/SOGo/SOGoPublicBaseFolder.m +++ b/SoObjects/SOGo/SOGoPublicBaseFolder.m @@ -1,8 +1,6 @@ /* SOGoPublicBaseFolder.m - this file is part of SOGo * - * Copyright (C) 2010 Inverse inc. - * - * Author: Wolfgang Sourdeau + * Copyright (C) 2010-2013 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by