fix(security): Security fix for WSTG-INPV-02. Add XSS protection on folders and mail title / content

This commit is contained in:
smizrahi committed 2022-11-14 14:36:46 +01:00
1 parent 967479335c
commit 714acfc838
9 files changed
+91 -8

No files matched your search

+2 -2
View File
@@ -76,7 +76,7 @@
request = [context request];
params = [[request contentAsString] objectFromJSONString];
folderName = [params objectForKey: @"name"];
folderName = [[params objectForKey: @"name"] stringWithoutHTMLInjection: YES];
if ([folderName length] > 0)
{
encodedFolderName = [folderName stringByEncodingImap4FolderName];
@@ -142,7 +142,7 @@
// Retrieve new folder name from JSON payload
request = [context request];
params = [[request contentAsString] objectFromJSONString];
newFolderName = [params objectForKey: @"name"];
newFolderName = [[params objectForKey: @"name"] stringWithoutHTMLInjection: YES];
if (!newFolderName || [newFolderName length] == 0)
{