Skip to content

Commit cca95ce

Browse files
committed
Merge branch 'develop'
2 parents f98ca1e + 0207453 commit cca95ce

25 files changed

+486
-97
lines changed

ChangeLog

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,153 @@
1+
commit db84a9213cdba79b28a7210e04b52c523c1a06ad
2+
Author: Hivert Quentin <quentin.hivert.fr@gmail.com>
3+
Date: Thu Aug 7 19:28:10 2025 +0200
4+
5+
fix(ActiveSync): ActiveSync dispatcher was not called if the 'Cmd' query was first
6+
7+
This won the award of "the most unrelated thing to cause a problem"
8+
9+
M sope-appserver/NGObjWeb/SoObjects/SoObjectRequestHandler.m
10+
11+
commit 280104e45c20519ac4849ebf8bca114d91383543
12+
Author: Stefan Bühler <source@stbuehler.de>
13+
Date: Sun Jun 29 10:21:32 2025 +0200
14+
15+
NGHashMap: keep root->last consistent to fix segfault adding duplicate key after copy
16+
17+
segfault because root->last is NULL:
18+
#0 -[NGMutableHashMap addObjects:count:forKey:]
19+
#1 -[NGMutableHashMap addObject:forKey:]
20+
#2 -[NGHttpRequest(WOSupport) _decodeFormContentURLParameters:]
21+
#3 -[NGHttpRequest(WOSupport) formParameters]
22+
23+
when POST and GET set the same parameter; trigger like this:
24+
25+
curl -d 'x=' 'https://.../SOGo/?x='
26+
27+
M sope-core/NGExtensions/NGHashMap.m
28+
29+
commit 3146fbdb6ff3314e37e5c3682deeeef7d0f32064
30+
Author: Hivert Quentin <quentin.hivert.fr@gmail.com>
31+
Date: Wed Jun 25 09:36:14 2025 +0200
32+
33+
Update ChangeLog
34+
35+
M ChangeLog
36+
37+
commit 927aaeadcff6a55416e1ef29faa7bbe90d63daea
38+
Author: Hivert Quentin <quentin.hivert.fr@gmail.com>
39+
Date: Tue Jun 17 15:28:53 2025 +0200
40+
41+
fix(smtp): allow smtp replies with only 3 chars (being the number code) instead of 4 (code + space)
42+
43+
M sope-mime/NGMail/NGSmtpClient.m
44+
45+
commit 2bec3d956c766b9cfbb37bef1f1868cea1293974
46+
Author: Hivert Quentin <quentin.hivert.fr@gmail.com>
47+
Date: Wed Jun 11 12:53:22 2025 +0200
48+
49+
fix(proxy): don't check bearer token auth
50+
51+
M sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m
52+
53+
commit 88611b402b9a393c031ebed1383e1f6a36fb8bd1
54+
Author: Hivert Quentin <quentin.hivert.fr@gmail.com>
55+
Date: Tue May 27 09:54:48 2025 +0200
56+
57+
fix(mysl): add decinmal type to nsnumber type
58+
59+
M sope-gdl1/MySQL/NSNumber+MySQL4Val.m
60+
61+
commit 29fba59e01259fc461fc6c60000ce395d1bbdde2
62+
Author: Hivert Quentin <quentin.hivert.fr@gmail.com>
63+
Date: Wed Apr 30 11:02:32 2025 +0200
64+
65+
Update ChangeLog
66+
67+
M ChangeLog
68+
69+
commit 5342b3e7a5e622830ec0a85a0873bd5cf325a99e
70+
Author: Hivert Quentin <quentin.hivert.fr@gmail.com>
71+
Date: Wed Apr 9 15:34:40 2025 +0200
72+
73+
fix(imap): properly quit the response parser in case of unexpected char
74+
75+
M sope-mime/NGImap4/NGImap4ResponseParser.m
76+
77+
commit 6a9af0c96eac78de771a7d11c505d9e9149c07b7
78+
Author: Hivert Quentin <quentin.hivert.fr@gmail.com>
79+
Date: Mon Mar 24 10:37:51 2025 +0100
80+
81+
Update ChangeLog
82+
83+
M ChangeLog
84+
85+
commit 61aef7a85966c8f7af00150e45d5c7d63da278d3
86+
Author: Hivert Quentin <quentin.hivert.fr@gmail.com>
87+
Date: Thu Feb 27 09:39:07 2025 +0100
88+
89+
feat(login): add xoauth2 and openid auth
90+
91+
M sope-appserver/NGObjWeb/NGObjWeb/WORequest.h
92+
M sope-appserver/NGObjWeb/SoObjects/SoCookieAuthenticator.h
93+
M sope-appserver/NGObjWeb/SoObjects/SoCookieAuthenticator.m
94+
M sope-appserver/NGObjWeb/SoObjects/SoHTTPAuthenticator.h
95+
M sope-appserver/NGObjWeb/SoObjects/SoHTTPAuthenticator.m
96+
M sope-appserver/NGObjWeb/SoObjects/SoObject+Traversal.m
97+
M sope-appserver/NGObjWeb/SoObjects/SoObjectRequestHandler.m
98+
M sope-appserver/NGObjWeb/SoObjects/SoUser.h
99+
M sope-appserver/NGObjWeb/SoObjects/SoUser.m
100+
M sope-appserver/NGObjWeb/WORequest.m
101+
M sope-mime/NGImap4/NGImap4Client.m
102+
M sope-mime/NGImap4/NGImap4ConnectionManager.h
103+
M sope-mime/NGImap4/NGImap4ConnectionManager.m
104+
M sope-mime/NGImap4/NGSieveClient.h
105+
M sope-mime/NGImap4/NGSieveClient.m
106+
M sope-mime/NGMail/NGSmtpClient.h
107+
M sope-mime/NGMail/NGSmtpClient.m
108+
109+
commit 75ded41e3dbdaa890ae5b15a844eea7dd9525597
110+
Author: Hivert Quentin <quentin.hivert.fr@gmail.com>
111+
Date: Tue Nov 26 10:30:25 2024 +0100
112+
113+
fix(https): don't shutdown the socket twice if error the first time
114+
115+
In some cases the second shutdown was hanging
116+
117+
M sope-core/NGStreams/NGActiveSSLSocket.m
118+
119+
commit 82ff9ceb6538052d26340bc1a5a7cf265e1de544
120+
Author: Hivert Quentin <quentin.hivert.fr@gmail.com>
121+
Date: Mon Nov 18 14:27:31 2024 +0100
122+
123+
chore(smtp): add the recipient in smtp error message if it is not already the case
124+
125+
M sope-mime/NGMail/NGSmtpClient.m
126+
127+
commit f77f86a78dfa9d676e836ce92827494b34df2f44
128+
Author: Hivert Quentin <quentin.hivert.fr@gmail.com>
129+
Date: Tue Oct 8 12:24:43 2024 +0200
130+
131+
Update ChangeLog
132+
133+
M ChangeLog
134+
135+
commit f08dfce90d626f30b1f80165bb537feb880ec207
136+
Author: smizrahi <seb.mizrahi@gmail.com>
137+
Date: Tue Aug 13 19:31:20 2024 +0200
138+
139+
fix(packaging): Add config.make as dependency of build-stamp
140+
141+
M packaging/debian/rules
142+
143+
commit 64776d9ee5eeb681a45303fac559aa1f36d16ed7
144+
Author: Hivert Quentin <quentin.hivert.fr@gmail.com>
145+
Date: Wed Aug 7 11:13:50 2024 +0200
146+
147+
Update ChangeLog
148+
149+
M ChangeLog
150+
1151
commit 4524ecafe27c8cfa9eef6977c6d4337d17ab99dd
2152
Author: smizrahi <seb.mizrahi@gmail.com>
3153
Date: Wed Jul 24 17:41:51 2024 +0200

sope-appserver/NGObjWeb/NGObjWeb/WORequest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <NGObjWeb/WOMessage.h>
2727
#include <NGObjWeb/NGObjWebDecls.h>
2828

29-
@class NSString, NSArray, NSData, NSDictionary, NSCalendarDate;
29+
@class NSString, NSArray, NSData, NSDictionary, NSCalendarDate, NSJSONSerialization;
3030
@class NGHashMap;
3131
@class NGHttpRequest;
3232

sope-appserver/NGObjWeb/SoObjects/SoCookieAuthenticator.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151

5252
- (BOOL)checkLogin:(NSString *)_login password:(NSString *)_pwd;
5353

54+
/* To set additionnal cookies (override in subclasses !)*/
55+
- (NSArray *)getCookiesIfNeeded: (WOContext *)_ctx;
56+
5457
/* Cookie authentication */
5558

5659
- (NSString *)cookieNameInContext:(WOContext *)_ctx;

sope-appserver/NGObjWeb/SoObjects/SoCookieAuthenticator.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ - (BOOL)checkLogin:(NSString *)_login password:(NSString *)_pwd {
6262
return NO;
6363
}
6464

65+
- (NSArray *)getCookiesIfNeeded: (WOContext *)_ctx
66+
{
67+
//Needs to be override by children if needed
68+
return nil;
69+
}
70+
6571
- (NSArray *)parseCredentials:(NSString *)_creds {
6672
if (![_creds isNotEmpty])
6773
return nil;

sope-appserver/NGObjWeb/SoObjects/SoHTTPAuthenticator.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646

4747
- (BOOL)checkLogin:(NSString *)_login password:(NSString *)_pwd;
4848

49+
/* To set additionnal cookies (override in subclasses !)*/
50+
- (NSArray *)getCookiesIfNeeded: (WOContext *)_ctx;
51+
4952
/* HTTP basic authentication */
5053

5154
- (NSString *)authRealmInContext:(WOContext *)_ctx;

sope-appserver/NGObjWeb/SoObjects/SoHTTPAuthenticator.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ - (BOOL)checkLogin:(NSString *)_login password:(NSString *)_pwd {
6060
return NO;
6161
}
6262

63+
- (NSArray *)getCookiesIfNeeded: (WOContext *)_ctx
64+
{
65+
//Needs to be override by children if needed
66+
return nil;
67+
}
68+
6369
+ (NSArray *)parseCredentials:(NSString *)_creds {
6470
/*
6571
returns an array containing two items, user and password.

sope-appserver/NGObjWeb/SoObjects/SoObject+Traversal.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ - (id)traverseKey:(NSString *)_name
148148
[self debugWithFormat:@" acquisition disabled."];
149149
}
150150

151-
/* did not find object ... */
151+
/* did not find object, can happend for api request */
152152
if (_isDebugOn())
153153
[self debugWithFormat:@" lookup of key '%@' failed.", _name];
154154
return nil;

sope-appserver/NGObjWeb/SoObjects/SoObjectRequestHandler.m

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "WORequest+So.h"
2929
#include <NGObjWeb/WOApplication.h>
3030
#include <NGObjWeb/WORequest.h>
31+
#include <NGObjWeb/WOCookie.h>
3132
#include <NGObjWeb/WOResponse.h>
3233
#include <NGObjWeb/WOElement.h>
3334
#include <NGObjWeb/WOTemplate.h>
@@ -169,7 +170,7 @@ - (NSMutableArray *)addSpecialFormValuesInRequest:(WORequest *)_rq
169170
return _traversalPath;
170171

171172
for (i = 0; i < count; i++) {
172-
NSString *key;
173+
NSString *key, *previous_key;
173174
unsigned klen;
174175
NSString *m;
175176

@@ -181,7 +182,11 @@ - (NSMutableArray *)addSpecialFormValuesInRequest:(WORequest *)_rq
181182
/* calculate method name */
182183

183184
m = nil;
184-
if (klen == 3 && [key isEqualToString:@"Cmd"]) {
185+
if([_traversalPath count] > 0)
186+
previous_key = [_traversalPath lastObject];
187+
else
188+
previous_key = @"";
189+
if (klen == 3 && [key isEqualToString:@"Cmd"] && ![previous_key isEqualToString:@"Microsoft-Server-ActiveSync"]) {
185190
/*
186191
Check for ASP style ?Cmd query parameter (required in ZideStore),
187192
the value is the additional path we need to add.
@@ -682,6 +687,24 @@ - (WOResponse *)handleRequest:(WORequest *)_rq
682687
}
683688

684689
[self->dispatcherRules reset];
690+
691+
//Check if the authenticator need to add cookies
692+
if(authenticator)
693+
{
694+
NSArray *listCookies;
695+
NSEnumerator *cookies;
696+
WOCookie *cookie;
697+
698+
listCookies = [authenticator getCookiesIfNeeded: _ctx];
699+
if(listCookies && [listCookies isKindOfClass:[NSArray class]])
700+
{
701+
cookies = [listCookies objectEnumerator];
702+
while((cookie = [cookies nextObject]))
703+
{
704+
[r addCookie: cookie];
705+
}
706+
}
707+
}
685708

686709
return r;
687710
}

sope-appserver/NGObjWeb/SoObjects/SoUser.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
@protocol SoUser
4141

4242
- (NSString *)login;
43+
- (NSString *)loginDomain;
4344

4445
/* returns the names of the roles assigned to the user */
4546
- (NSArray *)rolesInContext:(id)_ctx;

sope-appserver/NGObjWeb/SoObjects/SoUser.m

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ - (NSString *)login {
5151
return self->login;
5252
}
5353

54+
- (NSString *)loginDomain {
55+
NSRange r;
56+
NSString *domain = nil;
57+
r = [self->login rangeOfString: @"@"];
58+
if (r.location != NSNotFound)
59+
{
60+
domain = [self->login substringFromIndex: r.location+1];
61+
}
62+
return domain;
63+
}
64+
5465
/* roles */
5566

5667
- (NSArray *)rolesInContext:(id)_ctx {

0 commit comments

Comments
 (0)