Skip to content

Commit

Permalink
Fix for bug #2237
Browse files Browse the repository at this point in the history
  • Loading branch information
extrafu committed Jun 19, 2013
1 parent 871115e commit 1734b38
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
20 changes: 13 additions & 7 deletions 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 <wsourdeau@inverse.ca>
* 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
Expand Down Expand Up @@ -32,6 +30,7 @@
#import <NGExtensions/NSObject+Logs.h>

#import "SOGoPermissions.h"
#import "SOGoSystemDefaults.h"
#import "SOGoUser.h"

#import "SOGoProxyAuthenticator.h"
Expand Down Expand Up @@ -60,10 +59,17 @@ - (NSString *) checkCredentialsInContext: (WOContext *) context
{
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;
}

Expand Down
4 changes: 1 addition & 3 deletions SoObjects/SOGo/SOGoPublicBaseFolder.m
@@ -1,8 +1,6 @@
/* SOGoPublicBaseFolder.m - this file is part of SOGo
*
* Copyright (C) 2010 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* 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
Expand Down

0 comments on commit 1734b38

Please sign in to comment.