(feat) added AngularJS's XSRF support (#3246)

This commit is contained in:
Ludovic Marcotte
2016-04-26 11:07:22 -04:00
parent 2da7a04bac
commit 582baf2960
40 changed files with 224 additions and 129 deletions
+13 -16
View File
@@ -38,8 +38,6 @@
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserSettings.h>
#import <UI/Common/WODirectAction+SOGo.h>
#import "UIxMailFolderActions.h"
@implementation UIxMailFolderActions
@@ -225,7 +223,6 @@
SOGoUserSettings *us;
WOResponse *response;
NSException *error;
BOOL moved;
co = [self clientObject];
@@ -380,20 +377,20 @@
response = nil;
if ([value length] > 0)
{
uids = [value componentsSeparatedByString: @","];
response = [co archiveUIDs: uids
inArchiveNamed: [self labelForKey: @"Saved Messages.zip" inContext: context]
inContext: context];
if (!response)
response = [self responseWith204];
}
{
uids = [value componentsSeparatedByString: @","];
response = [co archiveUIDs: uids
inArchiveNamed: [self labelForKey: @"Saved Messages.zip" inContext: context]
inContext: context];
if (!response)
response = [self responseWith204];
}
else
{
jsonResponse = [NSDictionary dictionaryWithObject: [self labelForKey: @"Missing 'uid' parameter." inContext: context]
forKey: @"message"];
response = [self responseWithStatus: 500 andJSONRepresentation: jsonResponse];
}
{
jsonResponse = [NSDictionary dictionaryWithObject: [self labelForKey: @"Missing 'uid' parameter." inContext: context]
forKey: @"message"];
response = [self responseWithStatus: 500 andJSONRepresentation: jsonResponse];
}
return response;
}