mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
fix(vulnerability): prevent xss with events, tasks and contacts categories
This commit is contained in:
@@ -485,7 +485,7 @@ static Class SOGoContactGCSEntryK = Nil;
|
|||||||
co = [self clientObject];
|
co = [self clientObject];
|
||||||
card = [co vCard];
|
card = [co vCard];
|
||||||
request = [context request];
|
request = [context request];
|
||||||
params = [[request contentAsString] objectFromJSONString];
|
params = [[[request contentAsString] stringWithoutHTMLInjection: YES] objectFromJSONString];
|
||||||
forceSave = [[params objectForKey: @"ignoreDuplicate"] boolValue];
|
forceSave = [[params objectForKey: @"ignoreDuplicate"] boolValue];
|
||||||
|
|
||||||
[self setAttributes: params];
|
[self setAttributes: params];
|
||||||
|
|||||||
@@ -339,7 +339,7 @@
|
|||||||
[list retain];
|
[list retain];
|
||||||
|
|
||||||
request = [context request];
|
request = [context request];
|
||||||
params = [[request contentAsString] objectFromJSONString];
|
params = [[[request contentAsString] stringWithoutHTMLInjection: YES] objectFromJSONString];
|
||||||
|
|
||||||
o = [params objectForKey: @"refs"];
|
o = [params objectForKey: @"refs"];
|
||||||
if (![o isKindOfClass: [NSArray class]])
|
if (![o isKindOfClass: [NSArray class]])
|
||||||
|
|||||||
@@ -556,7 +556,7 @@
|
|||||||
|
|
||||||
ex = nil;
|
ex = nil;
|
||||||
request = [context request];
|
request = [context request];
|
||||||
params = [[request contentAsString] objectFromJSONString];
|
params = [[[request contentAsString] stringWithoutHTMLInjection: NO] objectFromJSONString];
|
||||||
if (params == nil)
|
if (params == nil)
|
||||||
{
|
{
|
||||||
ex = [NSException exceptionWithName: @"JSONParsingException"
|
ex = [NSException exceptionWithName: @"JSONParsingException"
|
||||||
|
|||||||
@@ -335,7 +335,7 @@
|
|||||||
|
|
||||||
ex = nil;
|
ex = nil;
|
||||||
request = [context request];
|
request = [context request];
|
||||||
params = [[request contentAsString] objectFromJSONString];
|
params = [[[request contentAsString] stringWithoutHTMLInjection: NO] objectFromJSONString];
|
||||||
if (params == nil)
|
if (params == nil)
|
||||||
{
|
{
|
||||||
ex = [NSException exceptionWithName: @"JSONParsingException"
|
ex = [NSException exceptionWithName: @"JSONParsingException"
|
||||||
|
|||||||
Reference in New Issue
Block a user