Paranoia controle op '..' in attachmentpad iets aanscherpen
De replace zou alleen de eerste '..' vervangen. Bovendien wil ik zeker zien in de logging svn path=/Website/trunk/; revision=30402
This commit is contained in:
@@ -318,8 +318,16 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
|
||||
default:
|
||||
INTERNAL_ERROR_MODULE;
|
||||
}
|
||||
result.AttachRootPath = result.AttachRootPath.replace("..", "_"); // paranoia mode, should never happen
|
||||
|
||||
if (result.AttachRootPath.indexOf("..") > -1 || // paranoia mode, should never happen
|
||||
result.AttachPath.indexOf("..") > -1)
|
||||
{
|
||||
__DoLog("Bad attach path with '..'\nAttachRootPath: {0}\nAttachPath: {1}".format(result.AttachRootPath, result.AttachPath), '#F00');
|
||||
INTERNAL_ERROR_BAD_ATTACHPATH;
|
||||
}
|
||||
result.AttachRootPath = result.AttachRootPath.replace("..", "_");
|
||||
result.AttachPath = result.AttachPath.replace("..", "_");
|
||||
|
||||
if (params.getFile)
|
||||
{
|
||||
if (fso.FileExists(result.AttachPath + params.getFile))
|
||||
|
||||
Reference in New Issue
Block a user