fix further file names vulnerabilities in modules

This commit is contained in:
wmayer
2019-10-03 02:37:25 +02:00
parent f9ca1b18a4
commit 3aa0432425
3 changed files with 12 additions and 1 deletions

View File

@@ -252,6 +252,7 @@ void CmdRaytracingWriteView::activated(int)
if (fn.isEmpty())
return;
std::string cFullName = (const char*)fn.toUtf8();
cFullName = strToPython(cFullName);
// get all objects of the active document
@@ -556,6 +557,7 @@ void CmdRaytracingExportProject::activated(int)
doCommand(Doc,"PageFile = open(App.activeDocument().%s.PageResult,'r')",Sel[0].FeatName);
std::string fname = (const char*)fn.toUtf8();
fname = strToPython(fname);
#if PY_MAJOR_VERSION < 3
doCommand(Doc,"OutFile = open(unicode('%s','utf-8'),'w')",fname.c_str());
#else