mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-11 14:35:28 +00:00
Monotone-Parent: 8e549e50cb51a6b6301c7b5cf0bc1863d2610949
Monotone-Revision: 1f3379bc1d46c50f1894d41c482b32cc154669fd Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-08-24T13:51:41 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
2007-08-24 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoMailFolder.m ([SOGoMailFolder
|
||||
-lookupName:_keyinContext:acquire:_acquire]): moved the lookup
|
||||
methods back here. Moved the folder existence check here, and do
|
||||
it on self only when the lookup happens for a non-folder object.
|
||||
This permits to accept entries for folders with parents who
|
||||
don't really exist.
|
||||
|
||||
2007-08-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/Scheduler/UIxTaskEditor.m ([UIxTaskEditor
|
||||
|
||||
@@ -225,42 +225,6 @@ static BOOL useAltNamespace = NO;
|
||||
|
||||
/* name lookup */
|
||||
|
||||
- (id) lookupImap4Folder: (NSString *) _key
|
||||
inContext: (id) _ctx
|
||||
{
|
||||
// TODO: we might want to check for existence prior controller creation
|
||||
NSURL *sf;
|
||||
SOGoMailFolder *newFolder;
|
||||
|
||||
/* check whether URL exists */
|
||||
|
||||
sf = [self imap4URL];
|
||||
sf = [NSURL URLWithString: [_key substringFromIndex: 6]
|
||||
relativeToURL: sf];
|
||||
|
||||
// - sf = [NSURL URLWithString:[[sf path] stringByAppendingPathComponent:_key]
|
||||
// - relativeToURL:sf];
|
||||
|
||||
if ([[self imap4Connection] doesMailboxExistAtURL: sf])
|
||||
newFolder = [SOGoMailFolder objectWithName: _key inContainer: self];
|
||||
else
|
||||
newFolder = nil;
|
||||
/*
|
||||
We may not return 404, confuses path traversal - but we still do in the
|
||||
calling method. Probably the traversal process should be fixed to
|
||||
support 404 exceptions (as stop traversal _and_ acquisition).
|
||||
*/
|
||||
|
||||
return newFolder;
|
||||
}
|
||||
|
||||
- (id) lookupImap4Message: (NSString *) _key
|
||||
inContext: (id) _ctx
|
||||
{
|
||||
// TODO: we might want to check for existence prior controller creation
|
||||
return [SOGoMailObject objectWithName: _key inContainer: self];
|
||||
}
|
||||
|
||||
- (id) lookupName: (NSString *) _key
|
||||
inContext: (id)_ctx
|
||||
acquire: (BOOL) _acquire
|
||||
@@ -268,13 +232,18 @@ static BOOL useAltNamespace = NO;
|
||||
id obj;
|
||||
|
||||
if ([_key hasPrefix: @"folder"])
|
||||
obj = [self lookupImap4Folder: _key inContext: _ctx];
|
||||
obj = [SOGoMailFolder objectWithName: _key inContainer: self];
|
||||
else
|
||||
{
|
||||
if (isdigit ([_key characterAtIndex: 0]))
|
||||
obj = [self lookupImap4Message: _key inContext: _ctx];
|
||||
if ([[self imap4Connection] doesMailboxExistAtURL: [self imap4URL]])
|
||||
{
|
||||
if (isdigit ([_key characterAtIndex: 0]))
|
||||
obj = [SOGoMailObject objectWithName: _key inContainer: self];
|
||||
else
|
||||
obj = [super lookupName: _key inContext: _ctx acquire: NO];
|
||||
}
|
||||
else
|
||||
obj = [super lookupName: _key inContext: _ctx acquire: NO];
|
||||
obj = nil;
|
||||
}
|
||||
|
||||
if (!obj && _acquire)
|
||||
|
||||
Reference in New Issue
Block a user